Commit 7e33d4dc by Bernd Schmidt Committed by Bernd Schmidt

Fix SSA inconsistencies with invalid asm reg names (PR67639)

	PR middle-end/67639
	* varasm.c (make_decl_rtl): Mark invalid register vars as
	DECL_EXTERNAL.

testsuite/
	PR middle-end/67639
	* c-c++-common/pr67639.c: New test.

From-SVN: r232125
parent c6a0add9
2015-12-15 Bernd Schmidt <bschmidt@redhat.com>
PR middle-end/67639
* varasm.c (make_decl_rtl): Mark invalid register vars as
DECL_EXTERNAL.
PR rtl-optimization/66206
* bt-load.c (find_btr_use): Change first arg to be a pointer to an rtx.
All callers changed.
......
2015-12-15 Bernd Schmidt <bschmidt@redhat.com>
PR middle-end/67639
* c-c++-common/pr67639.c: New test.
2016-01-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/69141
......
/* { dg-do compile } */
void
foo (int p)
{
int t;
register long x asm ("rhubarb") = p; /* { dg-error "register name" } */
__asm ("" : "=r" (t), "=r" (t), "=r" (t), "=r" (x) : "0" (x));
}
......@@ -1420,6 +1420,9 @@ make_decl_rtl (tree decl)
specifications. */
SET_DECL_ASSEMBLER_NAME (decl, NULL_TREE);
DECL_HARD_REGISTER (decl) = 0;
/* Also avoid SSA inconsistencies by pretending this is an external
decl now. */
DECL_EXTERNAL (decl) = 1;
return;
}
/* Now handle ordinary static variables and functions (in memory).
......
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