]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/64199 (ICE: tree check: expected class 'constant', have ...
authorRichard Biener <rguenther@suse.de>
Tue, 9 Dec 2014 11:58:51 +0000 (11:58 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 9 Dec 2014 11:58:51 +0000 (11:58 +0000)
2014-12-09  Richard Biener  <rguenther@suse.de>

PR middle-end/64199
* fold-const.c (fold_binary_loc): Use TREE_OVERFLOW_P.

* gcc.dg/torture/pr64199.c: New testcase.

From-SVN: r218513

gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr64199.c [new file with mode: 0644]

index 4a5de9ee59ad3daec6cd7d4ed4c211fa80df0056..0997ef4f3128cd9bc9f67afeaf6d17a9c8bb9aaa 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-09  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/64199
+       * fold-const.c (fold_binary_loc): Use TREE_OVERFLOW_P.
+
 2014-12-09  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/64191
index 94d1cbfc2b238f53ddbb9035646c0e19d1dacaa1..0c4fe4000700aaa2b305991f39e3fd35370bf6f0 100644 (file)
@@ -10398,8 +10398,8 @@ fold_binary_loc (location_t loc,
 
              /* Don't introduce overflows through reassociation.  */
              if (!any_overflows
-                 && ((lit0 && TREE_OVERFLOW (lit0))
-                     || (minus_lit0 && TREE_OVERFLOW (minus_lit0))))
+                 && ((lit0 && TREE_OVERFLOW_P (lit0))
+                     || (minus_lit0 && TREE_OVERFLOW_P (minus_lit0))))
                return NULL_TREE;
 
              if (minus_lit0)
index 31f740dba876673eb00a3471c03294071188a890..fbd11360617a6c04b534b3ce46e5aa95e3637c25 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-09  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/64199
+       * gcc.dg/torture/pr64199.c: New testcase.
+
 2014-12-09  Ilya Enkovich  <ilya.enkovich@intel.com>
 
        * gcc.dg/lto/lto.exp: Load mpx-dg.exp.
diff --git a/gcc/testsuite/gcc.dg/torture/pr64199.c b/gcc/testsuite/gcc.dg/torture/pr64199.c
new file mode 100644 (file)
index 0000000..e3f1002
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-ffast-math -frounding-math" } */
+
+float
+foo (void)
+{
+  return 1.1f + 2.2f + 2.2f;
+}
This page took 0.142046 seconds and 5 git commands to generate.