This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/23268] New: ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- From: "plgs at ozemail dot com dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Aug 2005 04:25:25 -0000
- Subject: [Bug c/23268] New: ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
ICE (segmentation fault) compiling a function containing two math functions (log
and rint), using -ffast-math and -O1 (or 2, 3 or s). Error does not occur when
-ffast-math not used. Error does not occur when optimisation flag not used (or
if -O0 used).
To reproduce, compile the following:
#include <math.h>
int f (float x) {
int a, b;
a = log(2.f);
b = rint(x);
return(a+b);
}
Using:
$ gcc -ffast-math -O1 -c test.c
Gives the following output:
test.c: In function 'f':
test.c:7: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
However, neither of
$ gcc -O1 -c test.c
nor
$ gcc -ffast-math -c test.c
cause the same error.
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1-20050730/configure --prefix=/usr/local/gcc41
Thread model: posix
gcc version 4.1.0 20050730 (experimental)
--
Summary: ICE using math functions log & rint, -ffast-math, -O1
(,2,3,s)
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: plgs at ozemail dot com dot au
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23268
- Follow-Ups:
- [Bug c/23268] ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- From: plgs at ozemail dot com dot au
- [Bug target/23268] [4.1 Regression] ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- From: pinskia at gcc dot gnu dot org
- [Bug target/23268] [4.1 Regression] ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- From: pinskia at gcc dot gnu dot org
- [Bug target/23268] [4.1 Regression] ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- From: pinskia at gcc dot gnu dot org
- [Bug target/23268] [4.1 Regression] ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- From: uros at kss-loka dot si
- [Bug target/23268] [4.1 Regression] ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- From: uros at kss-loka dot si
- [Bug target/23268] [4.1 Regression] ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- From: cvs-commit at gcc dot gnu dot org
- [Bug target/23268] [4.1 Regression] ICE using math functions log & rint, -ffast-math, -O1 (,2,3,s)
- From: pinskia at gcc dot gnu dot org