This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 2 GCC regressions, 2 new, with your patch on2003-02-23T04:05:29Z.
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: gcc-bugs at gcc dot gnu dot org
- Cc: ghazi at caip dot rutgers dot edu, green at redhat dot com, hp at axis dot com,jh at suse dot cz, joern dot rennecke at superh dot com, kelleycook at comcast dot net,mark at codesourcery dot com, ro at TechFak dot Uni-Bielefeld dot DE,roger at eyesopen dot com, schwab at suse dot de, wilson at tuliptree dot org,zack at codesourcery dot com, zlomekj at suse dot cz
- Date: 27 Feb 2003 17:24:55 +0100
- Subject: Re: 2 GCC regressions, 2 new, with your patch on2003-02-23T04:05:29Z.
- References: <200302240120.h1O1KAoU009421@devtools1.apple.com>
On Mon 24 Feb 2003 02:20, "GCC regression checker" wrote:
> With your recent patch, GCC has some regression test failures, which
> used to pass. There are 2 new failures, and 0
> failures that existed before and after that patch; 2 failures
> have been fixed.
>
> The new failures are:
> native gcc.sum gcc.dg/noreturn-1.c
> native gcc.sum gcc.dg/return-type-1.c
>
> The fixed failures are:
> native gcc.sum gcc.dg/20020201-4.c
> native gcc.sum gcc.dg/20020304-1.c
>
> For more information, see http://gcc.gnu.org/regtest/.
>
> ----
>
I've looked a bit at "return-type-1.c" (renamed to "t.c" in the test
below because I'm lazy...):
1 /* Missing warning for falling off the end of a non-void function.
2 egcs-1.1.2 passes, egcs-ss-19990428 fails.
3 http://gcc.gnu.org/ml/gcc-bugs/1999-03n/msg00221.html */
4 /* { dg-do compile } */
5 /* { dg-options "-O -Wreturn-type" } */
6 int
7 foo(void)
8 {
9 } /* { dg-warning "control reaches end of non-void function" "warning for falling off end of non-void function" } */
Could the FAIL be caused by incorrect line numbers? gcc-3.3 correctly
sees the warning on line 9, whereas gcc-3.4 thinks it is on line 8.
Greetz
Steven
steven:~/devel/gcc/build/gcc > cc1 -version -O -Wreturn-type t.c
GGC heuristics: --param ggc-min-expand=42 --param ggc-min-heapsize=23891
GNU C version 3.4 20030227 (experimental) (i586-pc-linux-gnu)
compiled by GNU C version 2.95.3 20010315 (SuSE).
options passed: -O -Wreturn-type
options enabled: -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse
-fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm
-floop-optimize -fcrossjumping -fif-conversion -fif-conversion2
-fsched-interblock -fsched-spec -fbranch-count-reg -fcprop-registers
-fcommon -fgnu-linker -fargument-alias -fmerge-constants
-fzero-initialized-in-bss -fident -fguess-branch-probability -fmath-errno
-ftrapping-math -m80387 -mhard-float -mno-soft-float -mieee-fp
-mfp-ret-in-387 -mtune=pentium -march=i386
foo
t.c: In function `foo':
t.c:8: warning: control reaches end of non-void function
Execution times (seconds)
parser : 0.02 (29%) usr 0.00 ( 0%) sys 0.02 (22%) wall
flow analysis : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.02 (22%) wall
TOTAL : 0.07 0.00 0.09
steven:~/devel/gcc/build-3.3/gcc > cc1 -version -O -Wreturn-type t.c
GGC heuristics: --param ggc-min-expand=42 --param ggc-min-heapsize=23891
GNU C version 3.3 20030224 (prerelease) (i586-pc-linux-gnu)
compiled by GNU C version 2.95.3 20010315 (SuSE).
options passed: -O -Wreturn-type
options enabled: -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse
-fkeep-static-consts -fpcc-struct-return -fgcse-lm -fgcse-sm
-floop-optimize -fcrossjumping -fif-conversion -fif-conversion2
-fsched-interblock -fsched-spec -fbranch-count-reg -fcprop-registers
-fcommon -fgnu-linker -fargument-alias -fmerge-constants
-fzero-initialized-in-bss -fident -fguess-branch-probability -fmath-errno
-ftrapping-math -m80387 -mhard-float -mno-soft-float -mieee-fp
-mfp-ret-in-387 -mcpu=pentium -march=i386
foo
t.c: In function `foo':
t.c:9: warning: control reaches end of non-void function
Execution times (seconds)
parser : 0.01 (50%) usr 0.00 ( 0%) sys 0.01 (23%) wall
rest of compilation : 0.00 ( 0%) usr 0.01 (50%) sys 0.02 (38%) wall
TOTAL : 0.02 0.02 0.05