+2009-04-22 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39824
+ * tree-ssa-ccp.c (fold_const_aggregate_ref): For INDIRECT_REFs
+ make sure the types are compatible.
+
2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/14875
+2009-04-22 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39824
+ * gcc.c-torture/compile/pr39824.c: New testcase.
+
2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/14875
--- /dev/null
+static const double internalEndianMagic = 7.949928895127363e-275;
+static const unsigned char ieee_754_mantissa_mask[] = { 0x00, 0x0F, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF };
+static inline int
+trio_isnan (double number)
+{
+ int has_mantissa = 0;
+ unsigned int i;
+ unsigned char current;
+ for (i = 0; i < (unsigned int)sizeof(double); i++)
+ {
+ current = ((unsigned char *)&number)[(((unsigned char
+ *)&internalEndianMagic)[7-(i)])];
+ has_mantissa |= (current & ieee_754_mantissa_mask[i]);
+ }
+ return has_mantissa;
+}
+void
+xmlXPathEqualNodeSetFloat(int nodeNr, double v)
+{
+ int i;
+ for (i=0; i<nodeNr; i++)
+ if (!trio_isnan(v))
+ break;
+}
+
if (TREE_CODE (base) == SSA_NAME
&& (value = get_value (base))
&& value->lattice_val == CONSTANT
- && TREE_CODE (value->value) == ADDR_EXPR)
+ && TREE_CODE (value->value) == ADDR_EXPR
+ && useless_type_conversion_p (TREE_TYPE (t),
+ TREE_TYPE (TREE_TYPE (value->value))))
return fold_const_aggregate_ref (TREE_OPERAND (value->value, 0));
break;
}