summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/const-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug/const-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/debug/const-3.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/const-3.c b/gcc/testsuite/gcc.dg/debug/const-3.c
new file mode 100644
index 000000000..2e9db490c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/const-3.c
@@ -0,0 +1,7 @@
+/* Make sure we don't emit strings just because of debug information
+ for string initializers. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+/* { dg-final { scan-assembler-not "dontgenerate" } } */
+static const char *p = "dontgenerate1";
+static const char *q[2] = { 0, "dontgenerate2" };