aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorIan Bolton <ian.bolton@arm.com>2014-03-11 09:41:20 +0000
committerIan Bolton <ibolton@gcc.gnu.org>2014-03-11 09:41:20 +0000
commit75b107f5942b75e085958c04b09dbcbf12ff68ac (patch)
treefd48f7a3b39bed1c64ffaed54b1ef79e82c480ce /gcc/c-family
parent747425d0e31ea9f57da6b5559502987f8e1b391a (diff)
downloadgcc-75b107f5942b75e085958c04b09dbcbf12ff68ac.zip
gcc-75b107f5942b75e085958c04b09dbcbf12ff68ac.tar.gz
gcc-75b107f5942b75e085958c04b09dbcbf12ff68ac.tar.bz2
Don't override -ffp-contract=fast if -funsafe-math-optimizations
From-SVN: r208474
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-opts.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 7d49933..0a3e0ad 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-11 Ian Bolton <ian.bolton@arm.com>
+
+ * c-opts.c (c_common_post_options): Don't override
+ -ffp-contract=fast if unsafe-math-optimizations is on.
+
2014-03-08 Paulo Matos <paulo@matos-sorge.com>
* c.opt: Enable LTO FE for fshort-double.
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index b7478f3..92ba481 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -834,7 +834,8 @@ c_common_post_options (const char **pfilename)
if (flag_iso
&& !c_dialect_cxx ()
&& (global_options_set.x_flag_fp_contract_mode
- == (enum fp_contract_mode) 0))
+ == (enum fp_contract_mode) 0)
+ && flag_unsafe_math_optimizations == 0)
flag_fp_contract_mode = FP_CONTRACT_OFF;
/* By default we use C99 inline semantics in GNU99 or C99 mode. C99