diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/return-type-3.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/return-type-3.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/return-type-3.c b/gcc/testsuite/gcc.dg/return-type-3.c new file mode 100644 index 00000000000..b6fa16539a4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/return-type-3.c @@ -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" } */ |