summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr94598.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/pr94598.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr94598.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr94598.c b/gcc/testsuite/gcc.dg/tree-ssa/pr94598.c
new file mode 100644
index 00000000000..a18a796aa0a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr94598.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+struct a {
+ int b;
+ short c;
+};
+int d;
+void e() {
+ struct a f[1];
+ f[d] = f[d];
+}
+
+struct S {
+ int a[30];
+ int c;
+};
+
+int get_int (void);
+
+int foo(struct S p)
+{
+ p.c = get_int ();
+ p.a[get_int()] = get_int()+1;
+ return p.c;
+}