Commit 483ef49f by Richard Guenther Committed by Richard Biener

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
parent dd9b0e0d
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> 2012-09-23 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/54669 PR tree-optimization/54669
......
...@@ -2333,24 +2333,21 @@ gimple_copy (gimple stmt) ...@@ -2333,24 +2333,21 @@ gimple_copy (gimple stmt)
} }
/* Make copy of operands. */ /* Make copy of operands. */
if (num_ops > 0)
{
for (i = 0; i < num_ops; i++) for (i = 0; i < num_ops; i++)
gimple_set_op (copy, i, unshare_expr (gimple_op (stmt, i))); gimple_set_op (copy, i, unshare_expr (gimple_op (stmt, i)));
/* 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)) if (gimple_has_mem_ops (stmt))
{ {
gimple_set_vdef (copy, gimple_vdef (stmt)); gimple_set_vdef (copy, gimple_vdef (stmt));
gimple_set_vuse (copy, gimple_vuse (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. */ /* SSA operands need to be updated. */
gimple_set_modified (copy, true); gimple_set_modified (copy, true);
} }
......
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> 2012-09-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/pr54669.c: New test. * gcc.dg/pr54669.c: New test.
......
/* { 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();
}
/* { 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment