diff options
author | James Greenhalgh <james.greenhalgh@arm.com> | 2016-12-20 16:17:27 +0000 |
---|---|---|
committer | James Greenhalgh <jgreenhalgh@gcc.gnu.org> | 2016-12-20 16:17:27 +0000 |
commit | 314e1b47dceafda7a52650915648703236bc4f23 (patch) | |
tree | b7b1211e081da6609886060d597693664c100be5 /gcc/opts.c | |
parent | aa90531ea4cfe2ceb9150943f601b67907b27811 (diff) | |
download | gcc-314e1b47dceafda7a52650915648703236bc4f23.zip gcc-314e1b47dceafda7a52650915648703236bc4f23.tar.gz gcc-314e1b47dceafda7a52650915648703236bc4f23.tar.bz2 |
[Patch] Turn -fexcess-precision=fast on when in -ffast-math
* common.opt (excess_precision): Tag as SetByCombined.
* opts.c (set_fast_math_flags): Also set
flag_excess_precision_cmdline.
(fast_math_flags_set_p): Also check flag_excess_precision_cmdline.
* doc/invoke.texi (-fexcess-precision): Drop text saying the
option has no effect under -ffast-math, make it clear that
-ffast-math will cause -fexcess-precision=fast by default even for
standards compliant modes.
(-ffast-math): Document that this sets -fexcess-precision=fast.
From-SVN: r243824
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2342,6 +2342,10 @@ set_fast_math_flags (struct gcc_options *opts, int set) opts->x_flag_errno_math = !set; if (set) { + if (opts->frontend_set_flag_excess_precision_cmdline + == EXCESS_PRECISION_DEFAULT) + opts->x_flag_excess_precision_cmdline + = set ? EXCESS_PRECISION_FAST : EXCESS_PRECISION_DEFAULT; if (!opts->frontend_set_flag_signaling_nans) opts->x_flag_signaling_nans = 0; if (!opts->frontend_set_flag_rounding_math) @@ -2374,7 +2378,9 @@ fast_math_flags_set_p (const struct gcc_options *opts) && opts->x_flag_unsafe_math_optimizations && opts->x_flag_finite_math_only && !opts->x_flag_signed_zeros - && !opts->x_flag_errno_math); + && !opts->x_flag_errno_math + && opts->x_flag_excess_precision_cmdline + == EXCESS_PRECISION_FAST); } /* Return true iff flags are set as if -ffast-math but using the flags stored |