This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
exit(0) is miscompiled under i686 linux
- To: gcc-bugs at gcc dot gnu dot org
- Subject: exit(0) is miscompiled under i686 linux
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Fri, 6 Oct 2000 19:42:57 -0400 (EDT)
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)