]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/return-type-3.c
b6fa16539a4d4b9563f2877ad20a5125cebd63c1
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / return-type-3.c
1 /* PR optimization/7189
2 This was a missing warning caused by a cfg cleanup after sibling
3 call optimization. The return clobber insn was cleaned up and
4 the warning was never issued. */
5 /* { dg-do compile } */
6 /* { dg-options "-foptimize-sibling-calls -Wreturn-type" } */
7
8 extern void foo(void);
9
10 int
11 bar (void)
12 {
13 foo();
14 } /* { dg-warning "control reaches end of non-void function" "warning for falling off end of non-void function" } */