Commit 50f30e6b by Jakub Jelinek Committed by Jakub Jelinek

re PR c/6809 (GCC 3.1 cc1 crashes if -fverbose-asm is specified)

	PR c/6809
	* print-rtl.c (print_mem_expr): Don't crash on unnamed fields.

	* gcc.dg/20020530-1.c: New test.

From-SVN: r54463
parent 156755ac
2002-06-10 Jakub Jelinek <jakub@redhat.com> 2002-06-10 Jakub Jelinek <jakub@redhat.com>
PR c/6809
* print-rtl.c (print_mem_expr): Don't crash on unnamed fields.
2002-06-10 Jakub Jelinek <jakub@redhat.com>
PR optimization/6842 PR optimization/6842
* combine.c (combine_simplify_rtx) [SUBREG]: Don't ICE if VOIDmode * combine.c (combine_simplify_rtx) [SUBREG]: Don't ICE if VOIDmode
operand subreg cannot be simplified. operand subreg cannot be simplified.
......
...@@ -88,8 +88,9 @@ print_mem_expr (outfile, expr) ...@@ -88,8 +88,9 @@ print_mem_expr (outfile, expr)
print_mem_expr (outfile, TREE_OPERAND (expr, 0)); print_mem_expr (outfile, TREE_OPERAND (expr, 0));
else else
fputs (" <variable>", outfile); fputs (" <variable>", outfile);
fprintf (outfile, ".%s", if (DECL_NAME (TREE_OPERAND (expr, 1)))
IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1)))); fprintf (outfile, ".%s",
IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1))));
} }
else if (DECL_NAME (expr)) else if (DECL_NAME (expr))
fprintf (outfile, " %s", IDENTIFIER_POINTER (DECL_NAME (expr))); fprintf (outfile, " %s", IDENTIFIER_POINTER (DECL_NAME (expr)));
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
* gcc.dg/20020531-1.c: New test. * gcc.dg/20020531-1.c: New test.
* gcc.dg/20020530-1.c: New test.
2002-06-07 Roger Sayle <roger@eyesopen.com> 2002-06-07 Roger Sayle <roger@eyesopen.com>
* gcc.dg/20020607-2.c: New test case. * gcc.dg/20020607-2.c: New test case.
......
/* PR c/6809
Test -fverbose-asm with unnamed fields. */
/* { dg-do compile } */
/* { dg-options "-fverbose-asm" } */
typedef union U
{
struct
{
unsigned int a;
int b;
};
long long c;
} *T;
int foo (T x)
{
int r = x->a + x->b;
return r;
}
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