This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/67133] [6 Regression] ICE at -Os and above on x86_64-linux-gnu in gimple_op, at gimple.h:2274
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 13 Aug 2015 16:03:01 +0000
- Subject: [Bug middle-end/67133] [6 Regression] ICE at -Os and above on x86_64-linux-gnu in gimple_op, at gimple.h:2274
- Auto-submitted: auto-generated
- References: <bug-67133-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67133
--- Comment #13 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Or
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -2684,8 +2684,10 @@ infer_nonnull_range_by_attribute (gimple stmt, tree op)
{
for (unsigned int i = 0; i < gimple_call_num_args (stmt); i++)
{
- if (POINTER_TYPE_P (TREE_TYPE (gimple_call_arg (stmt, i)))
- && operand_equal_p (op, gimple_call_arg (stmt, i), 0))
+ tree arg = gimple_call_arg (stmt, i);
+ if (TREE_TYPE (arg)
+ && POINTER_TYPE_P (TREE_TYPE (arg))
+ && operand_equal_p (op, arg, 0))
return true;
}
return false;