re PR middle-end/52173 (internal compiler error: verify_ssa failed possibly caused by itm)
2012-09-24 Richard Guenther <rguenther@suse.de> PR middle-end/52173 * gimple.c (gimple_copy): Properly mark the copy modified if SSA operands are present. * gcc.dg/tm/pr52173-1.c: New. * gcc.dg/tm/pr52173-2.c: New. From-SVN: r191658
This commit is contained in:
parent
dd9b0e0d28
commit
483ef49f9a
5 changed files with 55 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
|||
2012-09-24 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/52173
|
||||
* gimple.c (gimple_copy): Properly mark the copy modified
|
||||
if SSA operands are present.
|
||||
|
||||
2012-09-23 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
PR tree-optimization/54669
|
||||
|
|
27
gcc/gimple.c
27
gcc/gimple.c
|
@ -2333,23 +2333,20 @@ gimple_copy (gimple stmt)
|
|||
}
|
||||
|
||||
/* Make copy of operands. */
|
||||
if (num_ops > 0)
|
||||
for (i = 0; i < num_ops; i++)
|
||||
gimple_set_op (copy, i, unshare_expr (gimple_op (stmt, i)));
|
||||
|
||||
if (gimple_has_mem_ops (stmt))
|
||||
{
|
||||
for (i = 0; i < num_ops; i++)
|
||||
gimple_set_op (copy, i, unshare_expr (gimple_op (stmt, i)));
|
||||
gimple_set_vdef (copy, gimple_vdef (stmt));
|
||||
gimple_set_vuse (copy, gimple_vuse (stmt));
|
||||
}
|
||||
|
||||
/* Clear out SSA operand vectors on COPY. */
|
||||
if (gimple_has_ops (stmt))
|
||||
{
|
||||
gimple_set_def_ops (copy, NULL);
|
||||
gimple_set_use_ops (copy, NULL);
|
||||
}
|
||||
|
||||
if (gimple_has_mem_ops (stmt))
|
||||
{
|
||||
gimple_set_vdef (copy, gimple_vdef (stmt));
|
||||
gimple_set_vuse (copy, gimple_vuse (stmt));
|
||||
}
|
||||
/* Clear out SSA operand vectors on COPY. */
|
||||
if (gimple_has_ops (stmt))
|
||||
{
|
||||
gimple_set_def_ops (copy, NULL);
|
||||
gimple_set_use_ops (copy, NULL);
|
||||
|
||||
/* SSA operands need to be updated. */
|
||||
gimple_set_modified (copy, true);
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2012-09-24 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/52173
|
||||
* gcc.dg/tm/pr52173-1.c: New.
|
||||
* gcc.dg/tm/pr52173-2.c: New.
|
||||
|
||||
2012-09-23 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc.dg/pr54669.c: New test.
|
||||
|
|
19
gcc/testsuite/gcc.dg/tm/pr52173-1.c
Normal file
19
gcc/testsuite/gcc.dg/tm/pr52173-1.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-fgnu-tm -O3" } */
|
||||
|
||||
int vec[500];
|
||||
|
||||
void func()
|
||||
{
|
||||
__transaction_relaxed
|
||||
{
|
||||
vec[123] = 456;
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < 10; ++i)
|
||||
func();
|
||||
}
|
12
gcc/testsuite/gcc.dg/tm/pr52173-2.c
Normal file
12
gcc/testsuite/gcc.dg/tm/pr52173-2.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-fgnu-tm -O2" } */
|
||||
|
||||
int a;
|
||||
|
||||
int main()
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 1; ++i)
|
||||
__transaction_atomic { ++a; }
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue