We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa366ae commit 196dfebCopy full SHA for 196dfeb
flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
@@ -305,7 +305,8 @@ class DeclareOpConversion : public mlir::OpRewritePattern<fir::DeclareOp> {
305
declareOp.getTypeparams(), declareOp.getDummyScope(),
306
declareOp.getUniqName());
307
308
- // attach metadatas from fir.declare to fircg.ext_declare
+ // Propagate all attributes to fircg.ext_declare to avoid losing metadata
309
+ // including CUDA and OpenACC attributes.
310
for (const mlir::NamedAttribute &attr : declareOp->getAttrs())
311
xDeclOp->setAttr(attr.getName(), attr.getValue());
312
0 commit comments