Re: HEADS-UP: gcc-4.2 import appears to miscompile libm.
- From: Steve Kargl <sgk@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 26 May 2007 15:40:40 -0700
On Sat, May 26, 2007 at 11:48:35PM +0200, Ed Schouten wrote:
Hello Steve,
* Steve Kargl <sgk@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
mobile:kargl[234] cat a.c
#include <stdio.h>
#include <math.h>
int main (void) {
int n;
float a;
a = 1.f;
printf("%f\n", frexpf(a,&n));
return 0;
}
mobile:kargl[235] cc -o z a.c -lm
mobile:kargl[236] ./z
1.000000
mobile:kargl[237] cc --version
cc (GCC) 4.2.0 20070514 [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
frexpf() should return a value in [1/2,1).
In a different thread (about snd_emu10k1) a user noticed that -ftree-vrp
(part of -O2) may cause miscompilations. Could you try installing a libm
(src/lib/msun) that is compiled with -O1?
(cc'd -current list)
Using -O instead of -O2 indeed appears to fix the problem.
--
Steve
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: HEADS-UP: gcc-4.2 import appears to miscompile libm.
- From: Kris Kennaway
- Re: HEADS-UP: gcc-4.2 import appears to miscompile libm.
- References:
- HEADS-UP: gcc-4.2 import appears to miscompile libm.
- From: Steve Kargl
- HEADS-UP: gcc-4.2 import appears to miscompile libm.
- Prev by Date: Re: Segment failed SYNCOOKIE?
- Next by Date: Re: HEADS-UP: gcc-4.2 import appears to miscompile libm.
- Previous by thread: HEADS-UP: gcc-4.2 import appears to miscompile libm.
- Next by thread: Re: HEADS-UP: gcc-4.2 import appears to miscompile libm.
- Index(es):
Relevant Pages
|