summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr35899.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr35899.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr35899.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr35899.c b/gcc/testsuite/gcc.dg/pr35899.c
new file mode 100644
index 000000000..fca3a3d86
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr35899.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/35899 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+foo (void)
+{
+ int a = bar ();
+ return a;
+}
+
+void
+bar (void) /* { dg-warning "conflicting types for" } */
+{
+}
+
+/* { dg-message "note: previous implicit declaration" "" { target *-*-* } 8 } */