Re: HEADS-UP: gcc-4.2 import appears to miscompile libm.



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"



Relevant Pages

  • Re: [PATCH] i2c driver fixes for 2.6.0-test5
    ... This updates the current 2.6 PPC 4xx driver to the rewritten version ... This program is free software; you can redistribute it and/or modify ... -static int i2c_debug=0; ... -// from the controller telling us that the transaction we requested in complete. ...
    (Linux-Kernel)
  • [PATCH 9/20] FRV: Fujitsu FR-V CPU arch implementation part 7
    ... * This program is free software; ... * modify it under the terms of the GNU General Public License ... * as published by the Free Software Foundation; ... +# int atomic_add_return ...
    (Linux-Kernel)
  • [PATCH 04/04] Add LRW
    ... * modify it under the terms of the GNU General Public License ... * version 2 as published by the Free Software Foundation. ... +hexdumpTitle(char *title, unsigned char *buf, unsigned int len) ... +int lrw_raw_encrypt(struct crypto_tfm *tfm, ...
    (Linux-Kernel)
  • 2.6.13-rc2 white spaces patch
    ... Cryptographic API. ... AES Cipher Algorithm. ... This program is free software; you can redistribute it and/or modify it ... static inline void *prepare_src(struct scatter_walk *walk, int bsize, ...
    (Linux-Kernel)
  • [PATCH] 2.6.5- es7000 subarch update for generic arch
    ... * with Unisys ES7000 series hardware system manager. ... * published by the Free Software Foundation. ... -parse_unisys_oem (char *oemptr, int oem_entries) ... -static int __init ...
    (Linux-Kernel)