2 * Date: Thu
, 19 Aug
1999 10:02:32 +0200
3 * From
: Frederic Devernay
<devernay@istar
.fr
>
5 * X
-Accept
-Language
: French
, fr
, en
6 * To: gcc
-bugs@gcc
.gnu
.org
7 * Subject
: g77
2.95 bug
(Internal compiler error in `final_scan_insn
')
8 * X-UIDL: 08443f5c374ffa382a05573281482f4f
10 * Here's a bug that happens only when I compile with
-O
(disappears with
13 * > g77
-v
--save
-temps
-O
-c pcapop
.f
14 * g77 version
2.95 19990728 (release
) (from FSF
-g77 version
0.5.25
17 * /usr
/local
/lib
/gcc
-lib
/sparc
-sun
-solaris2
.6
/2.95/specs
18 * gcc version
2.95 19990728 (release
)
19 * /usr
/local
/lib
/gcc
-lib
/sparc
-sun
-solaris2
.6
/2.95/f771 pcapop
.f
-quiet
20 * -dumpbase pcapop
.f
-O
-version
-fversion
-o pcapop
.s
21 * GNU F77 version
2.95 19990728 (release
) (sparc
-sun
-solaris2
.6
) compiled
22 * by GNU C version
2.95 19990728 (release
).
23 * GNU Fortran Front
End version
0.5.25 19990728 (release
)
24 * pcapop
.f
: In
subroutine `pcapop
':
25 * pcapop.f:291: Internal compiler error in `final_scan_insn', at
27 * Please submit a full bug report
.
28 * See
<URL
:http
://egcs
.cygnus
.com
/faq
.html#bugreport
> for instructions
.
31 SUBROUTINE PCAPOP
(M1
,M2
,L1
,L2
,NMEM
,N1
,N2
,IB
,IBB
,K3
,TF
,TS
,TC
,TTO
)
32 DIMENSION NVA
(6),C
(6),I
(6)
34 C CALCUL DES PARAMETRES OPTIMAUX N1 N2 IB IBB
44 VY1
=3*RTE
+RDI
+8*REQ
+3*(RAD
+RMI
+RMU
)
46 AR2
=M2*
(2*(REQ
+RMI
)+3*RMU
+M1*
(2*RAD
+REQ
))
67 DO 3 NDE
=3,INDE
! { dg
-warning
"Obsolescent feature: Shared DO termination" }
72 C POUR AVOIR CES RESULTATS FAIRE TOURNER LE PROGRAMME VEFFT1
74 IF(N10
.EQ
.128.AND
.N20
.EQ
.128)TCFFTU
=3.35
75 IF(N10
.EQ
.64.AND
.N20
.EQ
.64)TCFFTU
=.70
76 IF(N10
.EQ
.32.AND
.N20
.EQ
.32)TCFFTU
=.138
77 IF(N10
.EQ
.16.AND
.N20
.EQ
.16)TCFFTU
=.0332
78 IF(N10
.EQ
.8.AND
.N20
.EQ
.8)TCFFTU
=.00688
79 IF(NDIF
.EQ
.64)TCFFTU
=1.566
80 IF(NDIF
.EQ
.96)TCFFTU
=.709
81 IF(NDIF
.EQ
.112)TCFFTU
=.349
82 IF(NDIF
.EQ
.120)TCFFTU
=.160
83 IF(NDIF
.EQ
.32)TCFFTU
=.315
84 IF(NDIF
.EQ
.48)TCFFTU
=.154
85 IF(NDIF
.EQ
.56)TCFFTU
=.07
86 IF(NDIF
.EQ
.16)TCFFTU
=.067
87 IF(NDIF
.EQ
.24)TCFFTU
=.030
88 IF(NDIF
.EQ
.8)TCFFTU
=.016
93 IF((N10
.LT
.L1
).OR
.(N20
.LT
.L2
)) GOTO 3
94 NB
=NMEM
-NDOU
-N20*
(L1
-1)
96 IF(NB
.LT
.(NVC
)) GOTO 3
97 CALL VALENT
(M1
,N30
,K1
)
98 CALL VALENT
(M2
,N40
,K2
)
100 IF((2*IS
).NE
.K1
)K1
=K1
+1
102 CALL VALENT
(M2
,N40
,JOFI
)
103 IF(NB
.GE
.(K1*N20*N30
+2*N20*
(L1
-1))) GOTO 4
107 MAX
=(NB
-2*N20*
(L1
-1))/(N20*N30
)
109 IF(MAX
.NE
.2*IN
) MAX
=MAX
-1
114 IF(IOFI*IB1*N30
.EQ
.M1
) GOTO1234
117 IF(IBB1
.EQ
.0) GOTO 1234
118 IF(M1
.EQ
.((IOFI
-1)*IB1*N30
+IBB1*N30
)) GOTO 1233
123 IF(IBX1
.EQ
.0)IBX1
=IB1
124 AR1
=M2*
(2*(RAD
+RMI
+RMU
+REQ
)+(M1
-(IOFI
-1)*IB1*N30
)*2*(REQ
+RAD
))
125 %+M2*
(3*(REQ
+RMU
+RAD
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=JOFI*
((IOFI
-1)*IB1
/2+IBX1
/2)*2*(3*RMU
+2*(RMI
+RAD
)+N40*
(3*RMI
153 %+4*RMU
+3*(RAD
+REQ
)+N30*
(2*RAD
+REQ
)))
156 TNRAN
=(N40
+(POI
-2)*N20
+(M2
-(JOFI
-1)*N40
+L2
-1))*(RMI
+RMU
+RAD
157 %+REQ
+N30*
(2*RAD
+2*REQ
)*(IB1*
(IOFI
-1)+IBX1
))
158 IF(TNRAN
.LT
.0.)TNRAN
=0.
159 TCPU
=T1
+T2
+T3
+T4
+T5
+T6
+T7
+T8
+T9
+T10
+TNRAN
164 NVA
(5)=M2
-(JOFI
-1)*N40
166 C
(1)=FLOAT
(IB1*N30
)/FLOAT
(M1
)
167 C
(2)=FLOAT
(M1
-(IOFI
-1)*IB1*N30
)/FLOAT
(M1
)
173 P1
=FLOAT
(NB
)/FLOAT
(M1
)
176 IF(IP1
.GE
.NVA
(K
)) GOTO 7
179 8 P2
=P2
-FLOAT
(IP2
)*C
(K
)
184 IF(IP1
.GE
.NVA
(K
))GOTO 7
194 TIOL
=(I
(2)+(IOFI
-1)*I
(1)+(POFI
-2)*(IOFI
-1)*I
(3)+(POFI
-
195 %2)*I
(4)+(IOFI
-1)*I
(5)+I
(6))*TACC
+(IOFI*M1*N40
+(POFI
-2)*IOFI*
196 %M1*N20
+(M2
-(JOFI
-1)*N40
+L2
-1)*M1*IOFI
)*TTRANS
197 IF(IBB1
.EQ
.0) GOTO 33
198 IF(IB1
.EQ
.IBB1
) GOTO 33
201 INL
=NMEM
/((IOFI
-1)*IB1*N30
+IBB1*N30
)
202 55 IF(INL
.GT
.N40
)INL
=N40
204 33 IF(IB1
.GT
.2) GOTO 36
205 IF((M1
-(IOFI
-1)*IB1*N30
).GE
.N30
) GOTO 36
207 INL
=NMEM
/(2*M1
-(IOFI
-1)*IB1*N30
)
210 INL
=NMEM
/(IOFI*IB1*N30
)
211 IF(INL
.GT
.N40
)INL
=N40
212 35 CALL VALENT
(N40
,INL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