[Bug libitm/57348] New: ICE for transaction expression in gimplify_expr
spear at cse dot lehigh.edu
gcc-bugzilla@gcc.gnu.org
Tue May 21 02:22:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57348
Bug ID: 57348
Summary: ICE for transaction expression in gimplify_expr
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libitm
Assignee: unassigned at gcc dot gnu.org
Reporter: spear at cse dot lehigh.edu
For the following simple test case:
int foo();
int demo();
int x;
int demo()
{
if (__transaction_atomic(x == -1))
{
foo();
}
return 1;
}
Compiled with:
gcc -fgnu-tm -c demo.c
Using the gcc svn trunk revision 199016
I receive the following error:
demo.c: In function 'demo':
demo.c:7:30: internal compiler error: in gimplify_expr, at gimplify.c:7809
if (__transaction_atomic(x == -1))
^
0x77e8fe gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../../src/gcc_trunk/gcc/gimplify.c:7809
0x77d01b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../../src/gcc_trunk/gcc/gimplify.c:7780
0x77bbec gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../../src/gcc_trunk/gcc/gimplify.c:7425
0x78849b gimplify_modify_expr
../../../src/gcc_trunk/gcc/gimplify.c:4868
0x77ce01 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../../src/gcc_trunk/gcc/gimplify.c:7160
0x780426 gimplify_stmt(tree_node**, gimple_statement_d**)
../../../src/gcc_trunk/gcc/gimplify.c:5692
0x78110d gimplify_bind_expr
../../../src/gcc_trunk/gcc/gimplify.c:1209
0x77c550 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../../src/gcc_trunk/gcc/gimplify.c:7331
0x780426 gimplify_stmt(tree_node**, gimple_statement_d**)
../../../src/gcc_trunk/gcc/gimplify.c:5692
0x780c06 gimplify_and_add
../../../src/gcc_trunk/gcc/gimplify.c:327
0x780c06 gimplify_and_return_first
../../../src/gcc_trunk/gcc/gimplify.c:339
0x77e0ab gimplify_transaction
../../../src/gcc_trunk/gcc/gimplify.c:6880
0x77e0ab gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../../src/gcc_trunk/gcc/gimplify.c:7640
0x77d01b gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../../src/gcc_trunk/gcc/gimplify.c:7780
0x783db8 gimplify_cond_expr
../../../src/gcc_trunk/gcc/gimplify.c:3245
0x77c468 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../../src/gcc_trunk/gcc/gimplify.c:7116
0x780426 gimplify_stmt(tree_node**, gimple_statement_d**)
../../../src/gcc_trunk/gcc/gimplify.c:5692
0x77c6eb gimplify_statement_list
../../../src/gcc_trunk/gcc/gimplify.c:1521
0x77c6eb gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
../../../src/gcc_trunk/gcc/gimplify.c:7549
0x780426 gimplify_stmt(tree_node**, gimple_statement_d**)
../../../src/gcc_trunk/gcc/gimplify.c:5692
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
The ICE goes away if I change the transaction expression to:
if (__transaction_atomic(x) == -1)
I think the test case is syntactically invalid, but it still shouldn't cause
GCC to crash.
More information about the Gcc-bugs
mailing list