Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!cernvax!tbl From: tbl@cernvax.UUCP (Tim Berners-Lee) Newsgroups: gnu.gcc.bug Subject: Under VAX/VMS bug in gas adding extern refs Message-ID: <1168@cernvax.UUCP> Date: 1 Dec 89 15:26:57 GMT Reply-To: tbl@cernvax.UUCP (Tim Berners-Lee) Distribution: gnu Organization: CERN European Laboratory for Particle Physics, CH-1211 Geneva, Switzerland Lines: 38 /* The following bug shows up under VAX/VMS in GAS, the gnu assembler. ** (Release of GCC = 1.35 or 1.36). The error message produced is: ** ** ** FATAL:Case value 6 unexpected at line 659 of file "vax.c" ** ** Replacing the + below with a - avoids the problem. ** */ main() { extern int x, y; exit((int)&x + (int)&y); } /* (A strange thing to want to do, I agree!) */ /*_______________________________________________________________ The assembler generated is as follows: #NO_APP gcc_compiled.: .comm _x,0 .comm _y,0 .text .align 1 .globl _main _main: .word 0x0 jsb _c$main_args movab _x+_y,r0 movl r0,_z ret .comm _z,4 _______________________________________________________________________ Tim Berners-Lee CERN (European Particle Physics Laboratory), 1211 Geneva 23, Switzerland tim@online.cern.ch */