This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/11220] New: g77: hiccup on variable declaration interchange
- From: "anlauf at hep dot tu-darmstadt dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2003 10:28:23 -0000
- Subject: [Bug fortran/11220] New: g77: hiccup on variable declaration interchange
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11220
Summary: g77: hiccup on variable declaration interchange
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: anlauf@hep.tu-darmstadt.de
CC: gcc-bugs@gcc.gnu.org
GCC host triplet: i586-suse-linux
The following code makes g77 puke:
% cat g77-bug.f
subroutine good (a, n)
implicit none
integer n, a(n)
a(1)=n
end
subroutine bug (a, n)
implicit none
integer a(n), n
a(1)=n
end
% g77 -c g77-bug.f
g77-bug.f: In subroutine `bug':
g77-bug.f:6:
subroutine bug (a, n)
1
g77-bug.f:8: (continued):
integer a(n), n
2
Invalid declaration of or reference to symbol `n' at (2) [initially seen at (1)]
g77-bug.f:6:
subroutine bug (a, n)
1
g77-bug.f:8: (continued):
integer a(n), n
2
Invalid declaration of or reference to symbol `n' at (2) [initially seen at (1)]
g77-bug.f:6:
subroutine bug (a, n)
1
g77-bug.f:9: (continued):
a(1)=n
2
Invalid declaration of or reference to symbol `a' at (2) [initially seen at (1)]
% g77 --version |head -1
GNU Fortran (GCC) 3.3 20030226 (prerelease) (SuSE Linux)
Replacing
integer a(n), n
by
integer n, a(n)
or removing
implicit none
fixes the symptom.
I reported this for g77 from 0.5.19.1 through 0.5.24-19981002
already on 16 Feb 2000, but nobody appeared to track this report.
I consider this an annoying inconvenience for legacy code.
Could somebody please look into this?