2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g77.f-torture / compile / 980310-7.f
blob9cfbaed692a9897c875f4c27731705d1643e7a81
1 C From: "David C. Doherty" <doherty@networkcs.com>
2 C Message-Id: <199711171846.MAA27947@uh.msc.edu>
3 C Subject: g77: auto arrays + goto = no go
4 C To: egcs-bugs@cygnus.com
5 C Date: Mon, 17 Nov 1997 12:46:27 -0600 (CST)
7 C I sent the following to fortran@gnu.ai.mit.edu, and Dave Love
8 C replied that he was able to reproduce it on rs6000-aix; not on
9 C others. He suggested that I send it to egcs-bugs.
11 C Hi - I've observed the following behavior regarding
12 C automatic arrays and gotos. Seems similar to what I found
13 C in the docs about computed gotos (but not exactly the same).
15 C I suspect from the nature of the error msg that it's in the GBE.
17 C I'm using egcs-971105, under linux-ppc.
19 C I also observed the same in g77-0.5.19 (and gcc 2.7.2?).
21 C I'd appreciate any advice on this. thanks for the great work.
22 C --
23 C >cat testg77.f
24 subroutine testg77(n, a)
26 implicit none
28 integer n
29 real a(n)
30 real b(n)
31 integer i
33 do i = 1, 10
34 if (i .gt. 4) goto 100
35 write(0, '(i2)')i
36 enddo
38 goto 200
39 100 continue
40 200 continue
42 return
43 end
44 C >g77 -c testg77.f
45 C testg77.f: In subroutine `testg77':
46 C testg77.f:19: label `200' used before containing binding contour
47 C testg77.f:18: label `100' used before containing binding contour
48 C --
49 C If I comment out the b(n) line or replace it with, e.g., b(10),
50 C it compiles fine.