================
@@ -0,0 +1,51 @@
+// RUN: cir-opt %s -verify-diagnostics -split-input-file
+
+!u8i = !cir.int<u, 8>
+!rec_NeedsCtor = !cir.record<struct "NeedsCtor" padded {!u8i}>
+
+module {
+ cir.global external @needsCtor = ctor : !rec_NeedsCtor {
+ }
+ // expected-error@+1 {{custom op 'cir.global' ctor region must have exactly
one block}}
----------------
andykaylor wrote:
This error is actually emitted by the parser. If we don't report this error,
the parser will implicitly create a block with a yield statement for this case.
which would be acceptable to the verifier. I'm not sure we actually need to
reject this as ill-formed CIR.
https://github.com/llvm/llvm-project/pull/160779
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits