return-type-3.c: New test.
authorSteven Bosscher <s.bosscher@student.tudelft.nl>
Tue, 11 Mar 2003 20:00:39 +0000 (21:00 +0100)
committerSteven Bosscher <steven@gcc.gnu.org>
Tue, 11 Mar 2003 20:00:39 +0000 (20:00 +0000)
2003-03-11  Steven Bosscher  <s.bosscher@student.tudelft.nl>

        * gcc.dg/return-type-3.c: New test.

From-SVN: r64181

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/return-type-3.c [new file with mode: 0644]

index 80900ccee74412090ee500844bcb45e22d2ccc32..6ec4a1580d0a02dbcdfbca2ce0838fdff49eea04 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-11  Steven Bosscher  <s.bosscher@student.tudelft.nl>
+
+       * gcc.dg/return-type-3.c: New test.
+
 2003-03-11  D.Venkatasubramanian  <dvenkat@noida.hcltech.com>
 
        * gcc.misc-tests/bprob.exp: Disable test cases for h8300-*-* as
diff --git a/gcc/testsuite/gcc.dg/return-type-3.c b/gcc/testsuite/gcc.dg/return-type-3.c
new file mode 100644 (file)
index 0000000..b6fa165
--- /dev/null
@@ -0,0 +1,14 @@
+/* PR optimization/7189
+   This was a missing warning caused by a cfg cleanup after sibling
+   call optimization.  The return clobber insn was cleaned up and
+   the warning was never issued.  */
+/* { dg-do compile } */
+/* { dg-options "-foptimize-sibling-calls -Wreturn-type" } */
+
+extern void foo(void);
+
+int
+bar (void)
+{
+  foo();
+} /* { dg-warning "control reaches end of non-void function" "warning for falling off end of non-void function" } */