aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr19345.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr19345.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr19345.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr19345.c b/gcc/testsuite/gcc.dg/pr19345.c
new file mode 100644
index 00000000000..40c6de4d836
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr19345.c
@@ -0,0 +1,12 @@
+/* We shouldn't crash trying to produce the inlined structure type die debug info. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -g" } */
+inline void bar(char a[], unsigned int l)
+{
+ asm volatile ("" :: "m" ( *(struct {char x[l]; } *)a));
+}
+
+void foo(void)
+{
+ bar (0, 0);
+}