re PR tree-optimization/39764 (ICE in set_lattice_value, at tree-ssa-ccp.c:468 with -ffinite-math-only)

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: r146157
This commit is contained in:
Richard Guenther 2009-04-16 09:39:20 +00:00 committed by Richard Biener
parent b095b8d252
commit 8e2c1630a2
4 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2009-04-15 Richard Guenther <rguenther@suse.de>
Backport from mainline:
PR tree-optimization/39764
* tree-ssa-ccp.c (get_value): Canonicalize value with
canonicalize_float_value.
2009-04-14 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:

View File

@ -1,3 +1,9 @@
2009-04-15 Richard Guenther <rguenther@suse.de>
Backport from mainline:
PR tree-optimization/39764
* g++.dg/torture/pr39764.C: New testcase.
2009-04-14 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:

View File

@ -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(""));

View File

@ -227,6 +227,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
@ -386,6 +388,8 @@ get_value (tree var)
if (val->lattice_val == UNINITIALIZED)
*val = get_default_value (var);
canonicalize_float_value (val);
return val;
}