re PR other/6782 (Specifing "-fverbose-asm" option throws ICE.)

PR other/6782
	* final.c (get_mem_expr_from_op): Return 0 if op is NULL.

	* gcc.dg/verbose-asm.c: New test.

From-SVN: r53856
This commit is contained in:
Jakub Jelinek 2002-05-24 23:40:25 +02:00 committed by Jakub Jelinek
parent 3620711b75
commit 9044229140
4 changed files with 39 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-05-24 Jakub Jelinek <jakub@redhat.com>
PR other/6782
* final.c (get_mem_expr_from_op): Return 0 if op is NULL.
2002-05-24 Neil Booth <neil@daikokuya.demon.co.uk>
PR preprocessor/6780

View File

@ -3171,6 +3171,9 @@ get_mem_expr_from_op (op, paddressp)
*paddressp = 0;
if (op == NULL)
return 0;
if (GET_CODE (op) == REG && ORIGINAL_REGNO (op) >= FIRST_PSEUDO_REGISTER)
return REGNO_DECL (ORIGINAL_REGNO (op));
else if (GET_CODE (op) != MEM)

View File

@ -1,3 +1,7 @@
2002-05-24 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/verbose-asm.c: New test.
2002-05-24 Neil Booth <neil@daikokuya.demon.co.uk>
* gcc.dg/cpp/paste12.c: New test.

View File

@ -0,0 +1,27 @@
/* Test whether -fverbose-asm works. */
/* { dg-do compile } */
/* { dg-options "-fverbose-asm" } */
void foo (int *x)
{
(*x)++;
}
int bar (int *y)
{
int a, b;
b = 10;
a = 26;
foo (&a);
a += 10;
foo (&a);
*y--;
return b;
}
int
main (int argc, char *argv [])
{
bar (&argc);
return 0;
}