summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/lto/pr52097_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/lto/pr52097_0.c')
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr52097_0.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/lto/pr52097_0.c b/gcc/testsuite/gcc.dg/lto/pr52097_0.c
new file mode 100644
index 0000000000..cd4af5d1f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr52097_0.c
@@ -0,0 +1,20 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 } } } */
+
+typedef struct { unsigned int e0 : 16; } s1;
+typedef struct { unsigned int e0 : 16; } s2;
+typedef struct { s1 i1; s2 i2; } io;
+
+static io *i;
+
+void f1 (void)
+{
+ s1 x0;
+ i->i1 = x0;
+}
+
+int main ()
+{
+ f1 ();
+ return 0;
+}