aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c b/SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c
new file mode 100644
index 00000000..ff08e7d6
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/930126-1.c
@@ -0,0 +1,20 @@
+struct s {
+ unsigned long long a:8, b:32;
+};
+
+struct s
+f(struct s x)
+{
+ x.b = 0xcdef1234;
+ return x;
+}
+
+main()
+{
+ static struct s i;
+ i.a = 12;
+ i = f(i);
+ if (i.a != 12 || i.b != 0xcdef1234)
+ abort();
+ exit(0);
+}