aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/pr57344-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/pr57344-3.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/pr57344-3.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/pr57344-3.c b/SingleSource/Regression/C/gcc-c-torture/execute/pr57344-3.c
new file mode 100644
index 00000000..f9daea6d
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/pr57344-3.c
@@ -0,0 +1,28 @@
+/* PR middle-end/57344 */
+
+struct __attribute__((packed)) S
+{
+ long long int a : 43;
+ long long int b : 22;
+ char c;
+ long long int : 0;
+} s[2];
+int i;
+
+__attribute__((noinline, noclone)) void
+foo (long long int x)
+{
+ if (x != -3161LL)
+ __builtin_abort ();
+ asm volatile ("" : : : "memory");
+}
+
+int
+main ()
+{
+ struct S t = { 0, -3161LL };
+ s[1] = t;
+ for (; i < 1; i++)
+ foo (s[1].b);
+ return 0;
+}