retitle 186937 [fixed in 3.3] [hppa, PR target/10271] Floating point args don't get reloaded across function calls at -O2 forwarded 186937 [EMAIL PROTECTED] thanks
Randolph Chung writes: > Package: gcc-3.2 > Severity: important > > [Debian note: this may be related to #185184 and #105816] > > When compiling the bug.c code below with -O2, the floating point > argument to the fprintf does not get reloaded for the second fprintf() > call, so the second call prints junk. At -O1 the arguments (r23/r24) > are properly reloaded. > > Compile with gcc -O2 -o bug bug.c -lm > $ ./bug > nan > 1.422968e-309 > > With -O1 > $ ./bug > nan > nan > > ------8< bug.c 8<-------- > #include <stdio.h> > #include <math.h> > > void doprint(double dval) > { > fprintf(stdout, "%e\n", dval); > fprintf(stdout, "%e\n", dval); > } > > int main(int argc, char **argv) > { > doprint(log(-8)); /* nan */ > return 0; > } > > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]