[flang-commits] [flang] [flang][rfc] Add represention of volatile references (PR #132486)

Asher Mancinelli via flang-commits flang-commits at lists.llvm.org
Mon Mar 31 14:56:20 PDT 2025


================
@@ -160,5 +159,12 @@ func.func private @upe() -> !fir.class<!fir.box<i32>>
 
 // -----
 
+// TODO: why are source locations lost on the error message?
+// the error message is printed but without a proper source location.
+// expected-error <skipme> @+1 {{invalid element type}}
+// func.func private @upe() -> !fir.box<!fir.class<none>>
----------------
ashermancinelli wrote:

TODO: source locations are lost during `parser.parseType()`, and I'm not sure why. We still get the expected error, but without the source info. I'm not sure if `parseFirType` is involved.
```
 #5 0x00007f8735421e65 abort (/usr/lib64/libc.so.6+0x21e65)
 #9 0x0000000000b5aea5 fir::BoxType::parse(mlir::AsmParser&)
#10 0x0000000000b57bc0 fir::parseFirType(fir::FIROpsDialect*, mlir::DialectAsmParser&)
#11 0x0000000002062e2c mlir::detail::Parser::parseExtendedType()
#12 0x000000000208123d mlir::detail::AsmParserImpl<mlir::OpAsmParser>::parseType(mlir::Type&)
#13 0x0000000002104d93 mlir::call_interface_impl::parseFunctionResultList(mlir::OpAsmParser&, llvm::SmallVectorImpl<mlir::Type>&, llvm::SmallVectorImpl<mlir::DictionaryAttr>&)
```
This will be addressed before I submit anything.

https://github.com/llvm/llvm-project/pull/132486


More information about the flang-commits mailing list