This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
3.2 PATCH: Fix _IEEE_FP etc. definitions on alpha
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 25 Jun 2002 23:46:28 +0200 (MEST)
- Subject: 3.2 PATCH: Fix _IEEE_FP etc. definitions on alpha
Neil,
this patch
http://gcc.gnu.org/ml/gcc-patches/2002-05/msg01172.html
2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
config/alpha:
* alpha.h (TARGET_CPU_CPP_BUILTINS): Define __IEEE_FP
and __IEEE_FP_INEXACT as appropriate.
(CPLUSPLUS_CPP_SPEC): Don't define __cplusplus.
(CPP_SPEC): Remove ieee defines.
* freebsd.h, netbsd.h: Remove ieee defines and cpp_cpu.
caused a couple of testsuite regressions on alpha-dec-osf5.1:
+FAIL: gcc.c-torture/execute/ieee/hugeval.c execution, -O0
+FAIL: gcc.c-torture/execute/ieee/hugeval.c execution, -O1
+FAIL: gcc.c-torture/execute/ieee/hugeval.c execution, -O2
+FAIL: gcc.c-torture/execute/ieee/hugeval.c execution, -O3 -fomit-frame-pointer
+FAIL: gcc.c-torture/execute/ieee/hugeval.c execution, -O3 -g
+FAIL: gcc.c-torture/execute/ieee/hugeval.c execution, -Os
This happens because the definition of HUGE_VAL changed compared to gcc
3.1. The wrong definition is chosen because <math.h> requires _IEEE_FP to
be defined, whereas your patch renamed the macro to __IEEE_FP (with two
leading underscores).
The following trivial patch fixes this.
C-only bootstrap in progress. Ok for mainline if it passes?
Rainer
Tue Jun 25 00:04:09 2002 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/alpha/alpha.h (TARGET_CPU_CPP_BUILTINS): Remove leading
underscore from __IEEE_FP and __IEEE_FP_INEXACT.
Index: gcc/config/alpha/alpha.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,v
retrieving revision 1.170
diff -u -p -r1.170 alpha.h
--- gcc/config/alpha/alpha.h 4 Jun 2002 04:06:35 -0000 1.170
+++ gcc/config/alpha/alpha.h 25 Jun 2002 21:45:30 -0000
@@ -64,9 +64,9 @@ Boston, MA 02111-1307, USA. */
builtin_assert ("cpu=ev4"); \
} \
if (TARGET_IEEE || TARGET_IEEE_WITH_INEXACT) \
- builtin_define ("__IEEE_FP"); \
+ builtin_define ("_IEEE_FP"); \
if (TARGET_IEEE_WITH_INEXACT) \
- builtin_define ("__IEEE_FP_INEXACT"); \
+ builtin_define ("_IEEE_FP_INEXACT"); \
\
/* Macros dependent on the C dialect. */ \
if (preprocessing_asm_p ()) \