]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/39764 (ICE in set_lattice_value, at tree-ssa-ccp.c:468 with...
authorRichard Guenther <rguenther@suse.de>
Wed, 15 Apr 2009 14:17:35 +0000 (14:17 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 15 Apr 2009 14:17:35 +0000 (14:17 +0000)
2009-04-15  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/39764
* tree-ssa-ccp.c (get_value): Canonicalize value with
canonicalize_float_value.

* g++.dg/torture/pr39764.C: New testcase.

From-SVN: r146120

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr39764.C [new file with mode: 0644]
gcc/tree-ssa-ccp.c

index 80f90940a4c39728eea93fa4f6563f08cb460a11..6ba81d270a4841d8633745729ca7cfc6a2f01276 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-15  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/39764
+       * tree-ssa-ccp.c (get_value): Canonicalize value with
+       canonicalize_float_value.
+
 2009-04-15  Jan Hubicka  <jh@suse.cz>
 
        * builtins.def (va_start, va_end, va_copy): Fix my previous commit.
index a6e9bf7329ef0adf8b95afe37391748c1c92bb98..f1a02b029c22f1bc962e651cc351b9facd0e500c 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-15  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/39764
+       * g++.dg/torture/pr39764.C: New testcase.
+
 2009-04-15  Nathan Sidwell  <nathan@codesourcery.com>
 
        * g++.dg/ext/altivec-17.C: New.
diff --git a/gcc/testsuite/g++.dg/torture/pr39764.C b/gcc/testsuite/g++.dg/torture/pr39764.C
new file mode 100644 (file)
index 0000000..a890133
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+class A;
+class B { };
+extern const double NaN;
+B foo(A* exec, double d);
+inline B baz(A* a)     {
+    return foo(a, NaN);
+}
+B bar(A* a) {
+    return baz(a);
+}
+extern const double NaN = (__builtin_nanf(""));
+
index 226fd3dbb27c6c29db1ab03dce506610233f8bed..b9b52cdaff78a01cc7fd9a6585539a818a20d844 100644 (file)
@@ -228,6 +228,8 @@ typedef enum
    doing the store).  */
 static prop_value_t *const_val;
 
+static void canonicalize_float_value (prop_value_t *);
+
 /* Dump constant propagation value VAL to file OUTF prefixed by PREFIX.  */
 
 static void
@@ -387,6 +389,8 @@ get_value (tree var)
   if (val->lattice_val == UNINITIALIZED)
     *val = get_default_value (var);
 
+  canonicalize_float_value (val);
+
   return val;
 }
 
This page took 0.094266 seconds and 5 git commands to generate.