aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-02-24 01:24:17 -0800
committerRichard Henderson <rth@gcc.gnu.org>2005-02-24 01:24:17 -0800
commitc74636694956af8e2fe74bbeddf72891b9b5cfb1 (patch)
tree42cf31816d33415d61bb35885b0514d50dcdc5b0 /gcc/toplev.c
parentd962e37d43ae054bc723d1940f77118eeb168ac3 (diff)
downloadgcc-c74636694956af8e2fe74bbeddf72891b9b5cfb1.zip
gcc-c74636694956af8e2fe74bbeddf72891b9b5cfb1.tar.gz
gcc-c74636694956af8e2fe74bbeddf72891b9b5cfb1.tar.bz2
re PR middle-end/18902 (Naive (default) complex division algorithm)
PR middle-end/18902 * c-opts.c (c_common_post_options): Set flag_complex_method to 2 for c99. * common.opt (fcx-limited-range): New. * opts.c (set_fast_math_flags): Set flag_cx_limited_range. * toplev.c (flag_complex_method): Initialize to 1. (process_options): Set flag_complex_method to 0 if flag_cx_limited_range. * doc/invoke.texi (-fcx-limited-range): New. From-SVN: r95493
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index ae564f0..e7947eb 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -269,7 +269,7 @@ int flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN;
1 means wide ranges of inputs must work for complex divide.
2 means C99-like requirements for complex multiply and divide. */
-int flag_complex_method = 0;
+int flag_complex_method = 1;
/* Nonzero means that we don't want inlining by virtue of -fno-inline,
not just because the tree inliner turned us off. */
@@ -1948,6 +1948,10 @@ process_options (void)
/* The presence of IEEE signaling NaNs, implies all math can trap. */
if (flag_signaling_nans)
flag_trapping_math = 1;
+
+ /* With -fcx-limited-range, we do cheap and quick complex arithmetic. */
+ if (flag_cx_limited_range)
+ flag_complex_method = 0;
}
/* Initialize the compiler back end. */