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:
Richard Guenther 2012-09-24 08:57:08 +00:00 committed by Richard Biener
parent dd9b0e0d28
commit 483ef49f9a
5 changed files with 55 additions and 15 deletions

View file

@ -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

View file

@ -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);

View file

@ -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.

View 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();
}

View 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;
}