jfc@athena.mit.edu (John F Carr) (09/03/90)
In article <skidrow.652140292@ceres> skidrow@ceres.ucsc.edu (Gary M. Lin) writes: > cc -g -O -c interface.c > 1500-004: (U) INTERNAL COMPILER ERROR while compiling main_interface. Compilation ended. Contact your I.B.M. Service representative and provide the following information: GRARNN: r291 is used before it is defined. > 1506-163: (S) Error recovery not possible. Compilation ended. >xlc: 1501-230 Internal compiler error; please contact your IBM representative >1254-004 The error code from the last failed command is 40. I've seen two internal compiler errors so far (trying to build gcc as a cross compiler for the RT): 1500-004: (U) INTERNAL COMPILER ERROR while compiling yylex. Compilation ended. Contact your I.B.M. Service representative and provide the following information:GRARNN: cr2316 is used before it is defined. 1506-163: (S) Error recovery not possible. Compilation ended. xlc: 1501-230 Internal compiler error; please contact your IBM representative The other error was just 1501-230 without any other explanatory text. A few comments on the compiler: 1. It uses the most memory of any compiler I've seen. It uses twice as much as mips cc 1.31 (25 MB to compile the g++ parser, compared to 12 MB for mips cc on a DECstation; fortunately, AIX 3 seems to page/swap better than ultrix 3 does). Even gcc doesn't use as much memory as xlc. I'm used to hc2.1 on the RT, which takes less than 3 MB to compile the same file: RT: PID TT STAT TIME SL RE PAGEIN DSIZ DRS LIM TSIZ TRS %CPU %MEM COMMAND 780 p0 R 5:35 0 99 47 1722 1718 13672 342 338 87.9 14.7 hc2com 6000: USER PID TTY PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM CMD jfc 14712 pts/2 5093 25760 18180 xx 2159 792 36.9% 74% xlcentry 2. From looking at the assembly listings, the compiler doesn't do a very good job of moving branch tests ahead of branches (if the test is 3 instructions ahead of the branch, the branch is free). I see a lot of consecutive test and branch instructions. 3. Is it possible to convince xlc to make an object declared const be read-only? According to /bin/size, it doesn't do this. I'm pretty sure that the entire "data" segment is read-write private (using the RT MMU, which is similar to that on the 6000, it is impractical to mix read-only shared and read-write private data in a single segment). Also, is there any equivalent to "cc -R" (compile read-only)? [For this question, answers for AIX 1.2 would also be welcome.] -- --John Carr (jfc@athena.mit.edu)
madd@world.std.com (jim frost) (09/04/90)
jfc@athena.mit.edu (John F Carr) writes: >The other error was just 1501-230 without any other explanatory text. This sounds like the internal error you get when you set up bsdcc as mentioned in the bsdport document. If you do this, remove the switches that tell it to use /lib/cpp. That preprocessor internal errors if a #pragma alloca is contained in the source. The builtin preprocessor does not. >A few comments on the compiler: >1. It uses the most memory of any compiler I've seen. The linker uses immense amounts of memory too (one person I know needed 70Mb of swap just to link his 10Mb executable). This stuff really needs to be tuned. jim frost saber software jimf@saber.com
jfc@athena.mit.edu (John F Carr) (09/04/90)
In article <1990Sep3.190213.3089@world.std.com> madd@world.std.com (jim frost) writes: >jfc@athena.mit.edu (John F Carr) writes: >>The other error was just 1501-230 without any other explanatory text. > >This sounds like the internal error you get when you set up bsdcc as >mentioned in the bsdport document. If you do this, remove the >switches that tell it to use /lib/cpp. That preprocessor internal >errors if a #pragma alloca is contained in the source. I refuse to use "bsdcc" for the same reason I never use hc -Hpcc on the RT: I believe in fixing the program, not the compiler (also, using bsdcc means turning off some optimizations). I think this is the stanza I used: xcc: use = DEFLT crt = /lib/crt0.o mcrt = /lib/mcrt0.o gcrt = /lib/gcrt0.o libraries = -lc proflibs = -L/lib/profiled,-L/usr/lib/profiled options = -H512,-T512 (this is the default, except with strict type checking and read-only strings). -- --John Carr (jfc@athena.mit.edu)