This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

exit(0) is miscompiled under i686 linux


With todays cvs, I experienced failure of the first rdbz test in the
libio testsuite.  Tracking this, I find that the `exit(0);' statement
in rdbzmain.c compiles to:

        movl    $0, 8(%ebp)
	jmp     exit

with -O2 or -O3.  As a result, the exit status value is garbage.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]