aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr94206.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr94206.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr94206.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr94206.c b/gcc/testsuite/gcc.dg/torture/pr94206.c
new file mode 100644
index 0000000..9e54bba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr94206.c
@@ -0,0 +1,17 @@
+/* { dg-do run { target lp64 } } */
+
+struct {
+ unsigned long x:33;
+} s;
+typedef __typeof__(s.x + 0) uint33;
+
+int main()
+{
+ uint33 x;
+ __builtin_memset(&x, -1, sizeof x);
+ unsigned long u;
+ __builtin_memcpy(&u, &x, sizeof u);
+ if (u != -1ul)
+ __builtin_abort ();
+ return 0;
+}