This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
IDENTIFIER_NODE accessed as declaration
- To: egcs-bugs at cygnus dot com
- Subject: IDENTIFIER_NODE accessed as declaration
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sat, 18 Apr 1998 17:00:24 +0200
When compiling SYSCALLS.c on i486-pc-linux-gnu, the current egcs
uses incorrect TYPE_NAMEs:
(gdb) l
359 tree t;
360 formals_style style;
361 {
362 tree chain_p;
363
364 if (TYPE_NAME (t) && DECL_NAME (TYPE_NAME (t)))
365 data_type = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (t)));
366 else
367 {
368 switch (TREE_CODE (t))
(gdb) p debug_tree(t->type.name)
<identifier_node 0x81f20c8 stat allocated from permanent_obstack
permanent>
The backtrace is
#0 fatal (s=0x81ab4e5 "%s:%d: Expect '%c', have '%c'\n")
at /usr/src1/egcs/gcc/toplev.c:1560
#1 0x8082585 in tree_class_check (node=0x81f20c8, cl=100 'd',
file=0x81a7874 "/usr/src1/egcs/gcc/c-aux-info.c", line=364)
at /usr/src1/egcs/gcc/tree.c:4983
#2 0x806af76 in gen_type (ret_val=0x820c988 "*", t=0x81f20fc, style=ansi)
at /usr/src1/egcs/gcc/c-aux-info.c:364
#3 0x806b0cf in gen_type (ret_val=0x81a785d "", t=0x820bc10, style=ansi)
at /usr/src1/egcs/gcc/c-aux-info.c:381
#4 0x806acbf in gen_formal_list_for_type (fntype=0x820bd54, style=ansi)
at /usr/src1/egcs/gcc/c-aux-info.c:180
#5 0x806b1af in gen_type (ret_val=0x820b9c8 "_fxstat", t=0x820bd54,
style=ansi) at /usr/src1/egcs/gcc/c-aux-info.c:401
#6 0x806b73b in gen_decl (decl=0x820bdb8, is_func_definition=0, style=ansi)
at /usr/src1/egcs/gcc/c-aux-info.c:580
#7 0x806b803 in gen_aux_info_record (fndecl=0x820bdb8, is_definition=0,
is_implicit=0, is_prototyped=1) at /usr/src1/egcs/gcc/c-aux-info.c:624
#8 0x80582c8 in start_decl (declarator=0x820bd38, declspecs=0x820b9d0,
initialized=0, attributes=0x0, prefix_attributes=0x0)
at /usr/src1/egcs/gcc/c-decl.c:3741
#9 0x804b70a in yyparse () at c-parse.y:1018
#10 0x8072d7e in compile_file (name=0xbffffa1e "SYSCALLS.i")
at /usr/src1/egcs/gcc/toplev.c:2545
Hope this helps,
Martin