re PR tree-optimization/18040 (ICE in for_each_index, at tree-ssa-loop-im.c:178)
2004-12-12 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/18040 * g++.dg/opt/ptrmem6.C: New test. 2004-12-12 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/18040 * expr.c (get_inner_reference): Remove NON_LVALUE_EXPR, NOP_EXPR, CONVERT_EXPR cases. (handled_component_p): Likewise. From-SVN: r92051
This commit is contained in:
parent
902c2ed4ea
commit
a5f712ff3f
|
@ -1,3 +1,10 @@
|
||||||
|
2004-12-12 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
|
PR tree-opt/18040
|
||||||
|
* expr.c (get_inner_reference): Remove NON_LVALUE_EXPR, NOP_EXPR,
|
||||||
|
CONVERT_EXPR cases.
|
||||||
|
(handled_component_p): Likewise.
|
||||||
|
|
||||||
2004-12-12 Kazu Hirata <kazu@cs.umass.edu>
|
2004-12-12 Kazu Hirata <kazu@cs.umass.edu>
|
||||||
|
|
||||||
* reg-stack.c (convert_regs_2): Free stack.
|
* reg-stack.c (convert_regs_2): Free stack.
|
||||||
|
|
19
gcc/expr.c
19
gcc/expr.c
|
@ -5293,16 +5293,6 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
|
||||||
conversions that don't change the mode, and all view conversions
|
conversions that don't change the mode, and all view conversions
|
||||||
except those that need to "step up" the alignment. */
|
except those that need to "step up" the alignment. */
|
||||||
|
|
||||||
case NON_LVALUE_EXPR:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NOP_EXPR:
|
|
||||||
case CONVERT_EXPR:
|
|
||||||
if (TYPE_MODE (TREE_TYPE (exp))
|
|
||||||
!= TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))))
|
|
||||||
goto done;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VIEW_CONVERT_EXPR:
|
case VIEW_CONVERT_EXPR:
|
||||||
if ((TYPE_ALIGN (TREE_TYPE (exp))
|
if ((TYPE_ALIGN (TREE_TYPE (exp))
|
||||||
> TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (exp, 0))))
|
> TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (exp, 0))))
|
||||||
|
@ -5445,20 +5435,11 @@ handled_component_p (tree t)
|
||||||
case COMPONENT_REF:
|
case COMPONENT_REF:
|
||||||
case ARRAY_REF:
|
case ARRAY_REF:
|
||||||
case ARRAY_RANGE_REF:
|
case ARRAY_RANGE_REF:
|
||||||
case NON_LVALUE_EXPR:
|
|
||||||
case VIEW_CONVERT_EXPR:
|
case VIEW_CONVERT_EXPR:
|
||||||
case REALPART_EXPR:
|
case REALPART_EXPR:
|
||||||
case IMAGPART_EXPR:
|
case IMAGPART_EXPR:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* ??? Sure they are handled, but get_inner_reference may return
|
|
||||||
a different PBITSIZE, depending upon whether the expression is
|
|
||||||
wrapped up in a NOP_EXPR or not, e.g. for bitfields. */
|
|
||||||
case NOP_EXPR:
|
|
||||||
case CONVERT_EXPR:
|
|
||||||
return (TYPE_MODE (TREE_TYPE (t))
|
|
||||||
== TYPE_MODE (TREE_TYPE (TREE_OPERAND (t, 0))));
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2004-12-12 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
|
PR tree-opt/18040
|
||||||
|
* g++.dg/opt/ptrmem6.C: New test.
|
||||||
|
|
||||||
2004-12-11 Roger Sayle <roger@eyesopen.com>
|
2004-12-11 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
PR middle-end/18921
|
PR middle-end/18921
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
// PR tree-opt/18040
|
||||||
|
// { dg-do compile }
|
||||||
|
// { dg-options "-O3" }
|
||||||
|
|
||||||
|
int PyObject_IsTrue();
|
||||||
|
struct object_base
|
||||||
|
{
|
||||||
|
void ptr() const;
|
||||||
|
void ptr1() const;
|
||||||
|
};
|
||||||
|
struct object : public object_base
|
||||||
|
{
|
||||||
|
typedef void (object::*bool_type)() const;
|
||||||
|
inline operator bool_type() const
|
||||||
|
{ return PyObject_IsTrue()
|
||||||
|
? &object_base::ptr : &object::ptr1; }
|
||||||
|
};
|
||||||
|
void f();
|
||||||
|
void g (void)
|
||||||
|
{
|
||||||
|
for (unsigned n = 0; n < 100; ++n)
|
||||||
|
{
|
||||||
|
object kv;
|
||||||
|
if (kv)
|
||||||
|
f();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue