PR tree-optimization/34113
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Use correct conversion direction for checking type compatibility.
* gcc.c-torture/compile/pr34113.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130223
138bc75d-0d04-0410-961f-
82ee72b054a4
2007-11-16 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/34113
+ * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
+ Use correct conversion direction for checking type compatibility.
+
+2007-11-16 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/34099
* tree-ssa-ccp.c (likely_value): Use a whitelist for operators
that produce UNDEFINED result if at least one of its operands
2007-11-16 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/34113
+ * gcc.c-torture/compile/pr34113.c: New testcase.
+
+2007-11-16 Richard Guenther <rguenther@suse.de>
+
PR tree-optimization/34099
* g++.dg/torture/pr3499.C: New testcase.
* gcc.c-torture/execute/pr34099.c: Likewise.
--- /dev/null
+struct sockaddr_in { int sin_addr; };
+static void ConvertAddr (struct sockaddr_in *saddr, void **addr)
+{
+ *addr = (void *) &saddr->sin_addr;
+}
+unsigned char EnableLocalHost (struct sockaddr_in *ifa_addr)
+{
+ unsigned char * addr;
+ ConvertAddr(ifa_addr, (void **)&addr);
+ return addr[0];
+}
|| TREE_CODE (rhs) == CONVERT_EXPR)
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == ADDR_EXPR
&& POINTER_TYPE_P (TREE_TYPE (rhs))
- && useless_type_conversion_p (TREE_TYPE (TREE_TYPE (rhs)),
- TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))))))
+ && useless_type_conversion_p (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))),
+ TREE_TYPE (TREE_TYPE (rhs)))))
{
if (forward_propagate_addr_expr (lhs, rhs))
{