Article View: gnu.gcc.bug
Article #838Under VAX/VMS bug in gas adding extern refs
From: Tim Berners-Lee
Date: Fri, 01 Dec 1989 15:26
Date: Fri, 01 Dec 1989 15:26
38 lines
1329 bytes
1329 bytes
/* 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
*/
Technical Details
Message-ID:
<1168@cernvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!cernvax!tblShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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