The current IDENTIFIER_NODE handling in pp_c_type_specifier can't work
because the first thing pp_c_tree_decl_identifier does is assert
that the passed tree is a DECL.  Instead the following patch arranges
us to use pp_c_identifier to dump an IDENTIFIER_NODE.

This (obvious?) patch is required to give a name to sizetype in
the middle-end.

I'll bootstrap/test it with some other changes, the gcc.dg testsuite
is now clean with sizetype having a IDENTIFIER_NODE TYPE_NAME.

Ok for trunk?

Thanks,
Richard.

2011-06-09  Richard Guenther  <rguent...@suse.de>

        c-family/
        * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
        to print a IDENTIFIER_NODE.

Index: gcc/c-family/c-pretty-print.c
===================================================================
--- gcc/c-family/c-pretty-print.c       (revision 174841)
+++ gcc/c-family/c-pretty-print.c       (working copy)
@@ -345,7 +345,7 @@ pp_c_type_specifier (c_pretty_printer *p
       break;
 
     case IDENTIFIER_NODE:
-      pp_c_tree_decl_identifier (pp, t);
+      pp_c_identifier (pp, IDENTIFIER_POINTER (t));
       break;
 
     case VOID_TYPE:

Reply via email to