more hpux 10.20 trouble: bad gencodes.c file (gengenrtl prob)
RDBrown@mira.net
RDBrown@mira.net
Tue Jan 16 03:11:00 GMT 2001
> More attempts to boot hppa2.0-hp-hpux10.20, this time --with-gnu-as .
> gcc/gencodes.c is bad and will not compile in the stage 2 build, but it
> compiles in stage 1. The problem is that there are duplicate definitions
> of many enums, such as cmp_type and processor_type; a number of macros are
> redefined as well.
> It turns out that the difficulty is that config/pa/pa32-regs.h and
> config/pa/pa.h are included twice, and there are no include guards.
> Adding #ifndef xxx/#define xxx 1/#endif constructs got the file to compile.
> I have no idea why this doesn't show up in stage 1 (I have an older gcc,
> 2.8.1, on that machine which is being used for the initial build).
> I seem to be having a similar problem in gcc/rtl.c; in this case, it
> seems that ggc.h is getting included twice, judging from
> /u/jbuck/gnu/src/cvs/gcc/gcc/ggc.h:200: redefinition of `ggc_statistics'
> /u/jbuck/gnu/src/cvs/gcc/gcc/ggc.h:200: `ggc_statistics' previously declared her
The same behaviour with the 0115 snapshot, on hppa2.0-hp-hpux10.20 and
hppa1.1-hp-hpux11.0 . The genrtl.c and genrtl.h files are identical,
so that genrtl.h ends up including itself when referenced.
Debugging, the -h argument to gengenrtl is not recognized - the value of
argc is incorrect. If this has happened before it may be worth guarding
with a "cmp genrtl.h genrtl.c".
bash-2.02$ gdb gengenrtl
Wildebeest is free software and you are welcome to distribute copies of
it under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for Wildebeest; type "show warranty"
for details.
Hewlett-Packard Wildebeest 0.75.04 10-Sep-1998 17:34 (based on GDB 4.16)
(built for PA-RISC 1.1 or 2.0, HP-UX 10.20)
Copyright 1996, 1997 Free Software Foundation, Inc...
Breakpoint 1 at 0x50f0
Breakpoint 2 (deferred) at "fancy_abort" ("fancy_abort" was not found).
Breakpoint deferred until a shared library containing "fancy_abort" is loaded.
Breakpoint 3 at 0x4490
(gdb) l
406 says we are writing the genrtl.h file. Otherwise we are writing the
407 genrtl.c file. */
408 extern int main PARAMS ((int, char **));
409
410 int
411 main (argc, argv)
412 int argc;
413 char **argv;
414 {
415 find_formats ();
(gdb) l
416 genlegend ();
417
418 if (argc == 2 && argv[1][0] == '-' && argv[1][1] == 'h')
419 genheader ();
420 else
421 gencode ();
422
423 fflush (stdout);
424 return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
425 }
(gdb) b 418
Breakpoint 4 at 0x51a8: file ../../gcc-20010115/gcc/gengenrtl.c, line 418.
(gdb) r -h
Starting program: /devel/span/rdb/src/gcc-20010115.obj/gcc/gengenrtl -h
warning: Unable to find __d_pid symbol in object file.
warning: Suggest linking with /opt/langtools/lib/end.o.
warning: GDB will be unable to track shl_load/shl_unload calls
Breakpoint 1 at 0x7af4bd5c
Breakpoint 3 at 0x7af42a78
/* Generated automatically by gengenrtl from rtl.def. */
Breakpoint 4, main (argc=1073745920, argv=0x7b03a4f8)
at ../../gcc-20010115/gcc/gengenrtl.c:418
418 if (argc == 2 && argv[1][0] == '-' && argv[1][1] == 'h')
(gdb) p argv[0]
$1 = (char *) 0x7b03a000 "/devel/span/rdb/src/gcc-20010115.obj/gcc/gengenrtl"
(gdb) p argv[1]
$2 = (char *) 0x7b03a033 "-h"
(gdb) p argv[2]
$3 = (char *) 0x0
(gdb) p argc
$4 = 1073745920
(gdb) bt
#0 main (argc=1073745920, argv=0x7b03a4f8)
at ../../gcc-20010115/gcc/gengenrtl.c:418
(gdb) printf "%x", argc
40001000(gdb) info reg
flags: 29000041 r18: 4000d310 pcsqt: 1e60800 ccr: 2002bda80
r1: 1e60800 r19: 7aea0840 eiem: fffffffffffffffe cr12: 900000000
rp: 51ab r20: 9f78400 iir: 10004 cr13: 0
r3: 7b03a4f8 r21: 7b03a9e8 isr: 0 cr24: ff3fc00000269ba0
r4: 40001000 r22: 0 ior: 0 cr25: ff3fc00000000000
r5: 7b03a4f8 r23: 3d5bd000001e0 ipsw: 4000f cr26: 10000ff874
r6: 7b03a504 r24: 85c0700 goto: 5e5c00001003ec mpsfu_hi: ffb3f0000017b31c
r7: 7b03a5e8 r25: 3d5bd006c2eb4 sr4: 1e60800 mpsfu_lo: 56200000000
r8: 7b03a5e8 r26: 3d5bd004c0f56 sr0: 1e60800 mpsfu_ov: 900000000
r9: 0 dp: 400018c0 sr1: 6ee6400 pad: 6f55e8746f0aa13c
r10: 4000bea0 ret0: 3b sr2: ffcec00 fpsr: 0
r11: 4000c6a0 ret1: 12a63200 sr3: 0 fpe1: 0
r12: 4000bea0 sp: 7b03a668 sr5: 9f78400 fpe2: 0
r13: 1 r31: 7affff43 sr6: 5675c00 fpe3: 0
r14: 40005074 sar: 1b sr7: 0 fpe4: 0
r15: 4000c6b8 pcoqh: 51a8 cr0: 10000fffb1 fpe5: 0
r16: 1 pcsqh: 1e60800 cr8: 4aee40c6000000 fpe6: 0
r17: 1 pcoqt: 51ac cr9: fffffb3f fpe7: 0
(gdb) set radix 0x10
Input and output radices now set to decimal 16, hex 10, octal 20.
(gdb) bt
#0 main (argc=0x40001000, argv=0x7b03a4f8)
at ../../gcc-20010115/gcc/gengenrtl.c:418
(gdb) q
The program is running. Quit anyway (and kill it)? (y or n) y
Temporarily disabling shared library breakpoints:
1 3
More information about the Gcc-bugs
mailing list