================
@@ -0,0 +1,44 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple x86_64-linux-pc -fsyntax-only -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple x86_64-windows-pc -fsyntax-only -verify -std=c++11 
%s
+// RUN: %clang_cc1 -triple i386-linux-pc -fsyntax-only -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple i386-windows-pc -fsyntax-only -verify -std=c++11 %s
+
+#if __BITINT_MAXWIDTH__ >= 35
+struct {
+  _BitInt(35) i : 33;
+} x;
+struct {
+  _BitInt(35) i : 34;
+} y;
+_BitInt(33) xx{ x.i };
+_BitInt(33) yy{ y.i };
+// expected-error@-1 {{non-constant-expression cannot be narrowed from type 
'_BitInt(35)' to '_BitInt(33)' in initializer list}}
+//   FIXME-expected-note@-2 {{insert an explicit cast to silence this issue}}
+#endif
+
+#if __BITINT_MAXWIDTH__ >= 3
----------------
AaronBallman wrote:

Same here

https://github.com/llvm/llvm-project/pull/78112
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to