[gnu.gcc.bug] VMS binaries

KEISTER@UINPLA.NPL.UIUC.EDU (Brad Keister) (06/19/89)

I've been able to retrieve the gcc-vms binaries from prep.ai.mit.edu, but 
am having trouble with the executables which it generates.  The simple
"Hello, world." file runs fine with VAX C, but the gcc-vms package 
generates an executable which yields "access violation" error messages.  
Has anyone else seen this and/or know what to do about it?  We are running 
VMS 5.1 here.

GCC.VMS-GCC] $ ty hello.c
#include <stdio.h>

main()
{
      printf("Hello, world.\n");
}

GCC.VMS-GCC] $ gcc hello.c
GCC.VMS-GCC] $ link hello,sys$share:vaxcrtl/lib
GCC.VMS-GCC] $ r hello
Hello, world.
%SYSTEM-?-ACCVIO, access violation, reason mask=00, virtual address=0000000E,
PC=0000000E, PSL=00000004
GCC.VMS-GCC] $ link hello,gcclib/lib,sys$share:vaxcrtl/lib
GCC.VMS-GCC] $ r hello
Hello, world.
%SYSTEM-?-ACCVIO, access violation, reason mask=00, virtual address=0000000E,
PC=0000000E, PSL=00000004
GCC.VMS-GCC] $ cc hello.c
GCC.VMS-GCC] $ link hello,sys$share:vaxcrtl/lib
GCC.VMS-GCC] $ r hello
Hello, world.
GCC.VMS-GCC] $ 

iglesias@orion.cf.uci.edu (Mike Iglesias) (06/21/89)

In article <8906200128.AA06396@life.ai.mit.edu> KEISTER@UINPLA.NPL.UIUC.EDU (Brad Keister) writes:
>I've been able to retrieve the gcc-vms binaries from prep.ai.mit.edu, but 
>am having trouble with the executables which it generates.  The simple
>"Hello, world." file runs fine with VAX C, but the gcc-vms package 
>generates an executable which yields "access violation" error messages.  
>Has anyone else seen this and/or know what to do about it?  We are running 
>VMS 5.1 here.
>
> [example deleted]

You need to put an 'exit(1);' after the printf.  I can't remember the
exact specifics of the problem, but I seem to remember that gcc isn't
setting up the exit status correctly.  You're not really getting an
error - gcc left something in R0 that made DCL think you got an
ACCVIO.


Mike Iglesias
University of California, Irvine