summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/pr33316.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug/pr33316.c')
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr33316.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/pr33316.c b/gcc/testsuite/gcc.dg/debug/pr33316.c
new file mode 100644
index 000000000..d43478bb5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr33316.c
@@ -0,0 +1,15 @@
+/* PR debug/33316 */
+
+int
+foo (void *x, int y)
+{
+ const struct { int d[y]; } *a = x;
+ return a[0].d[0];
+}
+
+int
+bar (void *x, int y)
+{
+ const struct S { int d[y]; } *a = x;
+ return a[0].d[0];
+}