pardo@STURGEON.CS.WASHINGTON.EDU (David Keppel) (02/22/90)
Machine: DECstation 3100 Config: config.gcc decstation Gcc: gcc 1.37 (prep.ai.mit.edu, 20 Feb., 1990) Four things: *1 Building gcc using with the native (/bin/cc) comnpiler. ccom: Warning: insn-emit.c, line 729: statement not reached operand0 = emit_operand[0]; ----------------------------^ The fragment of code looks like goto _done; operand0 = emit_operand[0]; ... _done: It isn't obvious to me (a) why this is done or (b) why it isn't commented. (Actually, `goto _done' is a macro DONE.) *2 Still building with the native compiler... ccom: Warning: insn-emit.c, line 749: zero or negative subscript rtx emit_operand[0]; --------------------^ It seems likely to me that a bunch of compilers are going to gag on this zero-based declaration. I haven't looked, but it isn't obvious to me that the variable is used in the function. In any case, I suggest that the macro ZERO should be used. It can expand to zero on most platforms, but can expand to one if the compiler gags on zero-based arrays (as, indeed, a number of compilers do gag on it). *3 On the `make' after `make stage1', the CFLAGS line includes the `-g' flag. The decstation port `cc1' gags and returns error code 1. The documentation for the decstation should say something. I suggest that `gcc' should complain but should not exit with an error status, since eventually `gas' and `gdb' will be ported and we will be able to use gcc with the `-g' flag. *4 Nearly every gcc file compiled with stage2 differs from the stage1-compiled file, even ignoring the first bytes. $ for file in *.o; do > echo $file > tail +10 $file > foo1 > tail +10 stage2/$file > foo2 > cmp foo1 foo2 > done c-convert.o foo1 foo2 differ: char 4837, line 29 c-decl.o foo1 foo2 differ: char 52281, line 113 [... and so on. ] I tried doing the following: compile each .c using stage1/gcc -S and using stage2/gcc -S, then compare the assembly files. In each case, the assembly was the same. Unless I screwed up, it is the assembler, not gcc, that is causing the difference. ;-D on ( Brought to you by the makers of... ) Pardo
jnp@mjolner.tele.nokia.fi (J|rgen N|rgaard) (02/23/90)
In article <9002220202.AA10288@sturgeon.cs.washington.edu> pardo@STURGEON.CS.WASHINGTON.EDU (David Keppel) writes: > Machine: DECstation 3100 > Config: config.gcc decstation > Gcc: gcc 1.37 (prep.ai.mit.edu, 20 Feb., 1990) [stuff deleted] *4 Nearly every gcc file compiled with stage2 differs from the stage1-compiled file, even ignoring the first bytes. $ for file in *.o; do > echo $file > tail +10 $file > foo1 > tail +10 stage2/$file > foo2 > cmp foo1 foo2 > done c-convert.o foo1 foo2 differ: char 4837, line 29 c-decl.o foo1 foo2 differ: char 52281, line 113 [... and so on. ] I tried doing the following: compile each .c using stage1/gcc -S and using stage2/gcc -S, then compare the assembly files. In each case, the assembly was the same. Unless I screwed up, it is the assembler, not gcc, that is causing the difference. ;-D on ( Brought to you by the makers of... ) Pardo Compiling a 'hello world' program and visit the binary (.o) with emacs reveal that it is the name of the /tmp/as???? file that is put in the object file. Try two subsequent compilations. -- ------------------------ ORIGIN '~jnp/stdDisclaimers' ------------------------ | Regards, J|rgen N|rgaard ('|' is '\o{}' in \LaTeX{}) | | e-mail: jnp@tele.nokia.fi | telephone: <..>-358-0-511-5671 | -- mail: Nokia Telecommunications, PL 33, SF-02601 Espoo Finland --
frank@croton.enet.dec.COM (Frank Wortner) (02/24/90)
In article <9002220202.AA10288@sturgeon.cs.washington.edu>, pardo@STURGEON.CS.WASHINGTON.EDU (David Keppel) writes: > *3 > > On the `make' after `make stage1', the CFLAGS line includes the `-g' > flag. The decstation port `cc1' gags and returns error code 1. Patches were posted a day or so ago to fix this --- by yours truly. You can either use them or just do a: make CC=stage1/gcc CFLAGS="-O -Bstage1/" A reasonable work-around. > *4 > > Nearly every gcc file compiled with stage2 differs from the > stage1-compiled file, even ignoring the first bytes. Use the "ecoff-cmp" script to compare the files. This should give you more accurate results. The assembler has the nasty habit of burying timestamps and temp-file names in the .o. The ecoff-cmp script skips those and compares only the parts that matter. Good luck. Frank