This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g77 parsing bug still present
- To: bug-gcc at gnu dot org
- Subject: g77 parsing bug still present
- From: Dominic-Luc Webb molmed <Dominic dot Luc-Webb at molmed dot ki dot se>
- Date: Mon, 4 Dec 2000 14:12:10 +0100 (MET)
There appears to be still be a bug in the parse checking
for g77. I attach a program that exemplifies this. I first
discovered and reported it about 3 years ago and
I noticed this afternoon that it is still there in
2.91.66 (all platforms I could test, GNU/Linux, SunOS
and SGI Irix). If the last term in the WRITE and
FORMAT statements at the end of the attached program
are removed, it compiles without errors. It seems
that long repetitive strings of commas and variables
are not handled by the parse checking protocol.
I have also found the same general parse checking
bug to be true for equations with sequences like.
z = ((a*b)**c)+((d*e)**f)...
It is very hard to use g77 for mathematics like
numerical integrations of complex differentials
with such a bug. Is there any hope it will get
fixed?
Sincerely,
Dominic
C -----------------------------------------------------------------------
C COPYRIGHT NOTICE
C F16BP_vs_F26BP simulator Written and copyrighted by Dominic-Luc Webb
C c1998. You may use this code freely, provided you acknowledge the authors
C above should it be used in publications, etc. The code may not be used
C for commercial application without the prior consent of Dominic-Luc Webb.
C He can be reached at dominic@enk.ks.se
C
C Compile with GNU g77 compiler. From prompt, type "g77 -o f16vf26 f16vsf26.f"
C
C -----------------------------------------------------------------------
REAL Time(2001)
REAL CITRATE(2001)
REAL F16BP(2001)
REAL F26BP(2001)
REAL G16BP(2001)
REAL R15BP(2001)
REAL OTHBP(2001)
REAL MPFK_FREE(2001)
REAL MPFK_F16BP(2001)
REAL MPFK_F26BP(2001)
REAL MPFK_G16BP(2001)
REAL MPFK_R15BP(2001)
REAL MPFK_OTHBP(2001)
INTEGER i
C
C Initialization: time in minutes, concentrations in molecules
C
C Free
C
CITRATE(1) = 7500
F16BP(1) = 100000
F26BP(1) = 1000
G16BP(1) = 1000
R15BP(1) = 1000
OTHBP(1) = 5000
Time(1) = 0.01
MPFK_FREE(1) = 9050
C
C Bound complexes
C
MPFK_F16BP(1) = 250
MPFK_F26BP(1) = 250
MPFK_G16BP(1) = 250
MPFK_R15BP(1) = 150
MPFK_OTHBP(1) = 50
C
C Total - fixed in this simulation
C
MPFK_TOT = 10000
CITRATE_TOT = 7500
F16BP_TOT = 100250
F26BP_TOT = 10000
G16BP_TOT = 50000
R15BP_TOT = 50000
OTHBP_TOT = 100000
C
C Integration time - 1 sec intervals
dt = 0.01666666
C
C Rate constants kx and k-x are replaced with c_
c_1=0.00001
c_2=0.00000001
c_3=0.000001
c_4=0.000000001
c_5=0.000001
c_6=0.0000000001
c_7=0.0000001
c_8=0.00000000001
c_9=0.0000001
c_10=0.0000000001
C
OPEN(UNIT=0, FILE='f16vsf26.dat', STATUS='NEW', FORM='FORMATTED')
DO 10 i=1,2001
F16BP(i+1) = F16BP_TOT - MPFK_F16BP(i)
MPFK_F16BP(i+1) = dt*c_1*F16BP(i)*MPFK_FREE(i) - dt*c_2*MPFK_F16BP(i) + MPFK_F16BP(i)
F26BP(i+1) = F26BP_TOT - MPFK_F26BP(i)
MPFK_F26BP(i+1) = dt*c_3*F26BP(i)*MPFK_FREE(i) - dt*c_4*MPFK_F26BP(i) + MPFK_F26BP(i)
G16BP(i+1) = G16BP_TOT - MPFK_G16BP(i)
MPFK_G16BP(i+1) = dt*c_5*G16BP(i)*MPFK_FREE(i) - dt*c_5*MPFK_G16BP(i) + MPFK_G16BP(i)
R15BP(i+1) = R15BP_TOT - MPFK_R15BP(i)
MPFK_R15BP(i+1) = dt*c_7*R15BP(i)*MPFK_FREE(i) - dt*c_8*MPFK_R15BP(i) + MPFK_R15BP(i)
OTHBP(i+1) = OTHBP_TOT - MPFK_OTHBP(i)
MPFK_OTHBP(i+1) = dt*c_9*OTHBP(i)*MPFK_FREE(i) - dt*c_10*MPFK_OTHBP(i) + MPFK_OTHBP(i)
MPFK_FREE(i+1) = MPFK_TOT - MPFK_F16BP(i) - MPFK_F26BP(i) - MPFK_G16BP(i) - MPFK_R15BP(i) - MPFK_OTHBP(i)
Time(i+1)=Time(i)+dt
10 CONTINUE
C
C Line 10 ends the simulation. Now we need an output file for plotting.
C The loop below writes every 10th value to file to keep the graphics
C output a managable size.
C
DO 105 i=1,2001,10
WRITE(0,107) Time(i),MPFK_FREE(i),MPFK_F16BP(i),MPFK_F26BP(i),MPFK_G16BP(i), MPFK_R15BP(i)
105 CONTINUE
107 FORMAT(1PE15.6,1X,1PE15.6,1X,1PE15.6,1X,1PE15.6,1X,1PE15.6,1X,1PE15.6)
STOP
END