OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [g77/] [19990826-3.f] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
c { dg-do compile }
2
* Date: Thu, 19 Aug 1999 10:02:32 +0200
3
* From: Frederic Devernay <devernay@istar.fr>
4
* Organization: ISTAR
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
9
 
10
* Here's a bug that happens only when I compile with -O (disappears with
11
* -O2)
12
 
13
* > g77 -v --save-temps -O -c  pcapop.f
14
* g77 version 2.95 19990728 (release) (from FSF-g77 version 0.5.25
15
* 19990728 (release))
16
* Reading specs from
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
26
* final.c:2920
27
* Please submit a full bug report.
28
* See <URL:http://egcs.cygnus.com/faq.html#bugreport> for instructions.
29
 
30
C* PCAPOP
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)
33
C
34
C CALCUL DES PARAMETRES OPTIMAUX N1 N2 IB IBB
35
C
36
      TACC=.035
37
      TTRANS=.000004
38
      RAD=.000001
39
      RMI=.000001
40
      RMU=.0000015
41
      RDI=.000003
42
      RTE=.000003
43
      REQ=.000005
44
      VY1=3*RTE+RDI+8*REQ+3*(RAD+RMI+RMU)
45
      VY2=REQ+2*RAD
46
      AR2=M2*(2*(REQ+RMI)+3*RMU+M1*(2*RAD+REQ))
47
C     VARIATION DE L1,L2,
48
C
49
      TTOTOP=1.E+10
50
      N1CO=0
51
      N2CO=0
52
      IBCO=0
53
      IBBCO=0
54
      K3CO=0
55
      TESOP=0.
56
      TCOP=0.
57
      TFOP=0.
58
      INUN=7
59
      INDE=7
60
      IF(M1.LT.128)INUN=6
61
      IF(M1.LT.64)INUN=5
62
      IF(M1.LT.32)INUN=4
63
      IF(M2.LT.128)INDE=6
64
      IF(M2.LT.64)INDE=5
65
      IF(M2.LT.32)INDE=4
66
      DO 3 NUN =3,INUN
67
      DO 3 NDE=3,INDE
68
      N10=2**NUN
69
      N20=2**NDE
70
      NDIF=(N10-N20)
71
      NDIF=IABS(NDIF)
72
C POUR AVOIR CES RESULTATS FAIRE TOURNER LE PROGRAMME VEFFT1
73
      TCFFTU=0.
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
89
      N30=N10-L1+1
90
      N40=N20-L2+1
91
      WW=VY1+N30*VY2
92
      NDOU=2*N10*N20
93
      IF((N10.LT.L1).OR.(N20.LT.L2)) GOTO 3
94
      NB=NMEM-NDOU-N20*(L1-1)
95
      NVC=2*N10*(N20-1)+M1
96
      IF(NB.LT.(NVC)) GOTO 3
97
      CALL VALENT(M1,N30,K1)
98
      CALL VALENT(M2,N40,K2)
99
      IS=K1/2
100
      IF((2*IS).NE.K1)K1=K1+1
101
      TFF=TCFFTU*K1*K2
102
      CALL VALENT(M2,N40,JOFI)
103
      IF(NB.GE.(K1*N20*N30+2*N20*(L1-1))) GOTO 4
104
      TIOOP=1.E+10
105
      IC=1
106
18    IB1=2*IC
107
      MAX=(NB-2*N20*(L1-1))/(N20*N30)
108
      IN=MAX/2
109
      IF(MAX.NE.2*IN) MAX=MAX-1
110
      K3=K1/IB1
111
      IBB1=K1-K3*IB1
112
      IOFI=M1/(IB1*N30)
113
      IRZ=0
114
      IF(IOFI*IB1*N30.EQ.M1) GOTO1234
115
      IRZ=1
116
      IOFI=IOFI+1
117
      IF(IBB1.EQ.0) GOTO 1234
118
      IF(M1.EQ.((IOFI-1)*IB1*N30+IBB1*N30)) GOTO 1233
119
      IRZ=2
120
      GOTO 1234
121
1233  IRZ=3
122
1234  IBX1=IBB1
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)+4*RMI+(M1-(IOFI-1)*IB1*N30)*(2*RAD+REQ)
126
     %+(IOFI-1)*IB1*N30*(2*RMI+REQ+RAD))
127
      AR5=(JOFI-1)*(N20-L2)*(M1-(IOFI-1)*IB1*N30)*(2*(RAD+RMU)+REQ)
128
     %*IOFI+(M2-(JOFI-1)*N40+L2-2)*(M1-(IOFI-1)*IB1*N30)*(2*(RAD+RMU
129
     %)+REQ)*IOFI
130
      WQ=((IOFI-1)*IB1+IBX1)*JOFI*WW
131
      AT1=N20*WQ
132
      AT2=N40*WQ
133
      QW=JOFI*(VY1+VY2*IB1*N30)
134
      AT3=IOFI*N40*QW
135
      AT4=(IOFI-1)*N40*QW
136
      AT5=JOFI*((IOFI-1)*N40*(IB1/IBX1)*(VY1+IBX1*N30*VY2)
137
     %+N40*((IB1/IBX1)*(IOFI-1)+1)*(VY1+IBX1*N30*VY2))
138
      AT6=JOFI*((IOFI-1)*N40*(IB1/2)*(VY1+2*N30*VY2)+N40*(
139
     %IB1*(IOFI-1)/2+IBX1/2)*(VY1+2*N30*VY2))
140
      T1=JOFI*N20*(L1-1)*REQ
141
      T2=M1*(L2-1)*REQ
142
      T3=JOFI*N20*IBX1*N30*(RAD+REQ)
143
      T4=JOFI*((IOFI-1)*IB1*N30*N20*(2*RMI+REQ)+IBX1*N30*N20*(2*RMI+R
144
     %EQ))
145
      T5=JOFI*((IOFI-1)*IB1/2+IBX1/2)*N20*N30*(2*RAD+REQ)
146
      T6=2*JOFI*(((IOFI-1)*IB1+IBX1)*N20)*((5*(RMI+RMU)+4*RAD
147
     %)+(L1-1)*(2*RAD+REQ)+N30*(2*RAD+REQ))
148
      T7=JOFI*2*((IOFI-1)*IB1+IBX1)*(L1-1)*(2*RAD+REQ)
149
      T8=JOFI*N10*N20*((IOFI-1)*IB1/2+IBX1/2)*(3*REQ+9*RAD+4*RMU+RMI)
150
      T9=N10*N20*JOFI*((IOFI-1)*IB1/2+IBX1/2)*(REQ+RMI)+M1*M2*(REQ+R
151
     %DI+2*RAD)
152
      T10=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)))
154
      POI=JOFI
155
      IF(POI.LE.2)POI=2
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
160
      NVA(1)=N40
161
      NVA(2)=N40
162
      NVA(3)=N20
163
      NVA(4)=N20
164
      NVA(5)=M2-(JOFI-1)*N40
165
      NVA(6)=NVA(5)
166
      C(1)=FLOAT(IB1*N30)/FLOAT(M1)
167
      C(2)=FLOAT(M1-(IOFI-1)*IB1*N30)/FLOAT(M1)
168
      C(3)=C(1)
169
      C(4)=C(2)
170
      C(5)=C(1)
171
      C(6)=C(2)
172
      K=1
173
      P1=FLOAT(NB)/FLOAT(M1)
174
10    IP1=P1
175
      I(K)=1
176
      IF(IP1.GE.NVA(K)) GOTO 7
177
      P2=P1
178
      IP2=P2
179
8     P2=P2-FLOAT(IP2)*C(K)
180
      IP2=P2
181
      IF(IP2.EQ.0) GOTO 3
182
      IP1=IP1+IP2
183
      I(K)=I(K)+1
184
      IF(IP1.GE.NVA(K))GOTO 7
185
      GOTO 8
186
7     IF(K.EQ.6) GOTO 11
187
      K=K+1
188
      GOTO 10
189
11    IP1=0
190
      IP2=0
191
      IP3=0
192
      POFI=JOFI
193
      IF(POFI.LE.2)POFI=2
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
199
      IF(IBB1.EQ.2)GOTO 34
200
      IP3=1
201
      INL=NMEM/((IOFI-1)*IB1*N30+IBB1*N30)
202
55    IF(INL.GT.N40)INL=N40
203
      GOTO 35
204
33    IF(IB1.GT.2) GOTO 36
205
      IF((M1-(IOFI-1)*IB1*N30).GE.N30) GOTO 36
206
34    IP1=1
207
      INL=NMEM/(2*M1-(IOFI-1)*IB1*N30)
208
      GOTO 55
209
36    IP2=1
210
      INL=NMEM/(IOFI*IB1*N30)
211
      IF(INL.GT.N40)INL=N40
212
35    CALL VALENT(N40,INL,KN1)
213
      CALL VALENT(M2-(JOFI-1)*N40,INL,KN2)
214
      CALL VALENT(INL*IBB1,IB1,KN3)
215
      CALL VALENT((N40-(KN1-1)*INL)*IBB1,IB1,KN4)
216
      IF((IP1+IP2+IP3).NE.1) CALL ERMESF(14)
217
      TIO1=0.
218
      IF(IP3.EQ.1)TIO1=N30*M2*TTRANS*(IB1*(IOFI-1)+IBB1)
219
      IF(IP1.EQ.1)TIO1=M1*M2*TTRANS
220
      IF(IP2.EQ.1) TIO1=(IB1*N30*M2*IOFI*TTRANS)
221
      TTIO=2.*TIO1+(KN1*IOFI*(JOFI-1)+KN2*IOFI+(KN1-1)*(
222
     %JOFI-1)+IOFI*(JOFI-1)+KN2-1.+IOFI+(KN1*(JOFI-1)+KN2))*TACC
223
     %+M1*M2*TTRANS+TIOL
224
      IF((IP1.EQ.1).AND.(IRZ.EQ.0))TCPU=TCPU+AT1+AT2+AT3
225
      IF((IP1.EQ.1).AND.(IRZ.NE.0))TCPU=TCPU+AT1+AT2+AT4+AR1
226
      IF((IP2.EQ.1).AND.(IRZ.EQ.0))TCPU=TCPU+AT1+AT2+AT3
227
      IF((IP2.EQ.1).AND.(IRZ.NE.0))TCPU=TCPU+AT1+AT2+AT3+AR2
228
      IFOIS=IB1/IBX1
229
      IF((IP3.EQ.1).AND.(IFOIS*IBX1.EQ.IB1))TCPU=TCPU+AT1+AT2+AT5+AR2
230
      IF((IP3.EQ.1).AND.(IFOIS*IBX1.NE.IB1))TCPU=TCPU+AT1+AT2+AT6+AR2
231
      IF((IP1.EQ.1).AND.(IRZ.EQ.1))TCPU=TCPU+AR5
232
      IF((IP1.EQ.1).AND.(IRZ.EQ.2))TCPU=TCPU+AR5
233
      TTIOG=TTIO+TCPU
234
      IF(TTIOG.LE.0.) GOTO 99
235
      IF(TTIOG.GE.TIOOP) GOTO 99
236
      IBOP=IB1
237
      IBBOP=IBB1
238
      K3OP=K3
239
      TIOOP=TTIOG
240
      TIOOP1=TTIO
241
      TIOOP2=TCPU
242
99    IF(IB1.GE.MAX)GOTO17
243
      IC=IC+1
244
      GOTO 18
245
4     T1=JOFI*N20*(L1-1)*REQ
246
      T2=M1*(L2-1)*REQ
247
      T3=JOFI*N20*N30*(RAD+REQ)*K1
248
      T4=JOFI*(K1*N30*N20*(2*RMI+REQ))
249
      T5=JOFI*N20*N30*(2*RAD+REQ)*K1/2
250
      T6=2*JOFI*(K1*N20)*((5*RMI+RMU)+4*RAD+(L1-1)*(2*RAD+REQ)+N30*2*
251
     %RAD+REQ)
252
      T7=JOFI*2*K1*(L1-1)*(2*RAD+REQ)
253
      T9=JOFI*N10*N20*K1*(REQ+RMI)/2+M1*M2*(REQ+RDI+2*RAD)
254
      T8=JOFI*N10*N20*K1*(3*REQ+9*RAD+4*RMU+RMI)/2
255
      T10=JOFI*K1*(3*RMU+2*(RMI+RAD)+N40*(3*RMI
256
     %+4*RMU+3*(RAD+REQ)+N30*(2*RAD+REQ)))
257
      PIO=JOFI
258
      IF(PIO.LE.2)PIO=2
259
      TNR=(N40+(PIO-2)*N20+(M2-(JOFI-1)*N40+L2-1))*(RMU+RMI+RAD+REQ+
260
     %N30*(2*RAD+2*REQ)*K1)
261
      IF(TNR.LE.0.)TNR=0.
262
      BT1=JOFI*N20*WW*K1
263
      BT2=JOFI*N40*WW*K1
264
      BT3=JOFI*N40*(VY1+K1*N30*VY2)
265
      BR1=M2*(2*(RAD+RMI+RMU+REQ)+(M1*2*(REQ+RAD)))+M2*(3*(
266
     $REQ+RAD+RMU)+4*(RMI)+M1*(2*(RAD)+REQ))
267
      BR2=M2*(2*(REQ+RMI)+3*RMU+M1*(2*RAD+REQ))
268
      TCPU=T1+T2+T3+T4+T5+T6+T7+T8+T9+T10
269
      TCPU=TCPU+TNR+BT1+BT2
270
      LIOF=M1/(N30)
271
      IRZ=0
272
      IF(LIOF*N30.EQ.M1) GOTO 2344
273
      IRZ=1
274
2344  IF(IRZ.EQ.0)TCPU=TCPU+BT3
275
      IF(IRZ.NE.0)TCPU=TCPU+BT3+BR2
276
      TIOOP=2.*FLOAT(M1)*FLOAT(M2)*TTRANS+2.*FLOAT(K2)*TACC+TCPU
277
      IBOP=1
278
      IBBOP=0
279
      K3OP=1
280
      TIOOP2=TCPU
281
      TIOOP1=TIOOP-TCPU
282
17    TTOT=TIOOP+TFF
283
      IF(TTOT.LE.0.) GOTO 3
284
      IF(TTOT.GE.TTOTOP)GOTO3
285
      N1CO=N10
286
      N2CO=N20
287
      IBCO=IBOP
288
      IBBCO=IBBOP
289
      K3CO=K3OP
290
      TTOTOP=TTOT
291
      TESOP=TIOOP1
292
      TCOP=TIOOP2
293
      TFOP=TFF
294
3     CONTINUE
295
 
296
      N1=N1CO
297
      N2=N2CO
298
      TTO=TTOTOP
299
      IB=IBCO
300
      IBB=IBBCO
301
      K3=K3CO
302
      TC=TCOP
303
      TS=TESOP
304
      TF=TFOP
305
      TT=TCOP+TFOP
306
      TWER=TTO-TT
307
      IF(N1.EQ.0.OR.N2.EQ.0) CALL OUTSTR(0,'PAS DE PLACE MEMOIRE SUFFISA
308
     $NTE POUR UNE MISE EN OEUVRE PAR BLOCS$')
309
      IF(IB.NE.1)RETURN
310
      IHJ=(M1/(N1-L1+1))
311
      IF(IHJ*(N1-L1+1).NE.M1)IHJ=IHJ+1
312
      IHJ1=IHJ/2
313
      IF(IHJ1*2.NE.IHJ)GOTO7778
314
      IB=IHJ
315
      IBB=0
316
      RETURN
317
7778  IB=IHJ+1
318
      IBB=0
319
      RETURN
320
      END

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.