summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr30473.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr30473.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr30473.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr30473.c b/gcc/testsuite/gcc.dg/pr30473.c
new file mode 100644
index 000000000..f01c1cc4a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr30473.c
@@ -0,0 +1,13 @@
+/* PR middle-end/30473 */
+/* Make sure this doesn't ICE. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern int sprintf (char *, const char *, ...);
+
+void
+foo (char *buf1, char *buf2)
+{
+ sprintf (buf1, "%s", "abcde");
+ sprintf (buf2, "%s");
+}