Bug 82539 - [7/8 Regression] ICE in gimplify_modify_expr, at gimplify.c:5693
Summary: [7/8 Regression] ICE in gimplify_modify_expr, at gimplify.c:5693
Status: RESOLVED DUPLICATE of bug 81661
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: unknown
: P3 normal
Target Milestone: 7.3
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2017-10-13 08:37 UTC by Martin Liška
Modified: 2017-10-13 09:28 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2017-10-13 08:37:58 UTC
Starting from r237064, we ICE on:

$ cat ice.i
int a, b, c;
void d ()
{
  while (a + c > b)
    a--;
}

$ gcc ice.i -Wall -c -Ofast -ftrapv -mtune=generic -march=x86-64
during GIMPLE pass: vect
In function ‘d’:
cc1: internal compiler error: in gimplify_modify_expr, at gimplify.c:5693
0x931a57 gimplify_modify_expr
	../../gcc/gimplify.c:5692
0x91cd5c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc/gimplify.c:11335
0x91f9c8 gimplify_stmt(tree_node**, gimple**)
	../../gcc/gimplify.c:6551
0x924f0e gimplify_cond_expr
	../../gcc/gimplify.c:4019
0x91cd80 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc/gimplify.c:11292
0x91f9c8 gimplify_stmt(tree_node**, gimple**)
	../../gcc/gimplify.c:6551
0x924ad0 gimplify_cond_expr
	../../gcc/gimplify.c:3912
0x91cd80 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc/gimplify.c:11292
0x93043b gimplify_modify_expr
	../../gcc/gimplify.c:5518
0x91cd5c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc/gimplify.c:11335
0x93268c force_gimple_operand_1(tree_node*, gimple**, bool (*)(tree_node*), tree_node*)
	../../gcc/gimplify-me.c:78
0xe2d474 vect_build_loop_niters(_loop_vec_info*, bool*)
	../../gcc/tree-vect-loop-manip.c:1115
0xe2601c vect_transform_loop(_loop_vec_info*)
	../../gcc/tree-vect-loop.c:7341
0xe41763 vectorize_loops()
	../../gcc/tree-vectorizer.c:761
Comment 1 Jakub Jelinek 2017-10-13 08:41:14 UTC
Don't we have a DUP of this already?  Any kind of gimplify_expr after initial gimplification is problematic with -ftrapv.
Comment 2 Martin Liška 2017-10-13 09:28:42 UTC
Dup.

*** This bug has been marked as a duplicate of bug 81661 ***