From:	MERC::"uunet!ARISIA.dnet.ge.com!CRDGW2::CRDGW2::MRGATE::SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 12-APR-1992 21:23:37.05
To:	galaxy::GleEve
CC:	
Subj:	gcc 2.1 (vax vams) bug

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.137)
	 id AA05404; Sun, 12 Apr 92 19:56:04 EDT
Received: From ucbvax.Berkeley.EDU ([128.32.133.1]) by CRVAX.SRI.COM with TCP; Sun, 12 APR 92 11:14:31 PDT
Received: by ucbvax.Berkeley.EDU (5.63/1.43)
	id AA26708; Sat, 11 Apr 92 15:03:16 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 10 Apr 92 04:49:37 GMT
From: mintaka.lcs.mit.edu!ai-lab!ai.mit.edu!gnulists@bloom-beacon.mit.edu  (Chiraprakash Nayak)
Organization: TULANE, BMEN, NEW ORLEANS, LA
Subject: gcc 2.1 (vax vams) bug
Message-Id: <00958DE8.9F81C9E0@MV3600.BMEN.TULANE.EDU>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

Hi;

Here is buglet. I am using the precompiled version of gcc 2.1 (vax vms) from
mango.rsmas.miami.edu.

The extra ``;''in bug.c leads to gcc getting access violation when 
optimization (-O1) is on. With /noopt, gcc exits normally with 
appropriate error messages. 

BTW, a couple of lines need to be added to the installation script (1.40b 
vax vms at prep) since cpp 2.1 spits out the version number with an extra 
``(vax vms)'' after `` .. 2.1'' otherwise gcc dies complaining about 
unknown version.


--Nayak

-------------------------------
chiraprakash@BPBME::gcc/vers/verb bug.c
%GCC-I-VERSION, this is version 2.1.0 of the GCC-VMS driver.
$ gcc_cpp -v  BUG.C SYS$SCRATCH:GCC_20E003F8.CPP
GNU CPP version 2.1 (vax vms)
$ gcc_cc1 SYS$SCRATCH:GCC_20E003F8.CPP -dumpbase BUG -
   -mgnu -version "-O1" -mvaxc-alignment   -o SYS$SCRATCH:GCC_20E003F8.S
GNU C version 2.1 (vax vms) compiled by GNU C version 1.40.
enabled: -fdefer-pop -fthread-jumps -fpeephole -ffunction-cse -finline
         -fcommon -fgnu-linker -mvaxc-alignment
 main
bug.c: In function `main':
bug.c:19: parse error before `;'
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=0000000C, PC
=000624B2, PSL=03C00000
%TRACE-F-TRACEBACK, symbolic stack dump follows
module name     routine name                     line       rel PC    abs PC

LOOP            find_and_verify_loops            2217      00000358  000624B2
LOOP            loop_optimize                     393      0000015B  000603C7
TOPLEV          rest_of_compilation              2126      00000440  0002FA22
C-DECL          finish_function                  5586      00000086  00021E62
C-PARSE         yyparse                           371      00000702  00019BC6
TOPLEV          compile_file                     1607      00000709  0002F005
TOPLEV          main                             3012      000008E8  00030CBC
%GCC-I-NOOBJECT No object file was produced.

------------------------ bug.c ---------------------------------
#include <stdio.h>
#include <math.h>

int 
main 
(int argc, char** argv)
{

  int ok;
  float x1,y1,z1;


#ifdef VMS
  if (!shell$is_shell())
    getredirection(&argc, &argv);
#endif /* ifdef VMS */

  for(; (ok = fscanf(stdin,"%f %f %f",&x1,&y1,&z1)) != NULL;;)
    ;
  return 1;
}

----
 
-------------------------------------------------------------------------
Chiraprakash Nayak		Brain Physics Group
O:(504) 865-5897		Department of Biomedical Engg.
R:(504) 866-3715		Tulane University
				New Orleans, La 70118
Internet: Chiraprakash@mv3600.bmen.tulane.edu; Bm2gebg@vm.tcs.tulane.edu;
	  nayakcp@convex1.tcs.tulane.edu
-------------------------------------------------------------------------

