[parisc-linux] hppa-linux gcc-3.0.3: -O2 optimization does not handle fp args correctly
John David Anglin
dave@hiauly1.hia.nrc.ca
Mon, 4 Feb 2002 12:04:27 -0500 (EST)
> legolas[22:24] ~% gcc -O2 -o logtest logtest.c -lm
> legolas[22:24] ~% ./logtest
> float: -1.002099
This looks ok with my new build of 3.1:
dave@gsyprf11:~/gcc_test$ gcc -O2 -o logtest logtest.c -lm
dave@gsyprf11:~/gcc_test$ ./logtest
float: nan
dave@gsyprf11:~/gcc_test$ gcc -O1 -o logtest logtest.c -lm
dave@gsyprf11:~/gcc_test$ ./logtest
float: nan
The problem that needs fixing in the linker is passing floating
arguments to indirect functions. The above program doesn't involve
an indirect call.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)