This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60526] [4.9/5/6 Regression] Accepts-invalid: Variable name same as type name
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 Jan 2016 21:20:08 +0000
- Subject: [Bug fortran/60526] [4.9/5/6 Regression] Accepts-invalid: Variable name same as type name
- Auto-submitted: auto-generated
- References: <bug-60526-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60526
--- Comment #10 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 37495
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37495&action=edit
provisional patch
The patch appears to work, but the formatting for the errors looks strange.
Consider:
ig25@linux-fd1f:~/Krempel/Type> cat type.f90
type X
end type
integer :: q
real :: a
integer, parameter :: h=3
type(X) :: X
end
ig25@linux-fd1f:~/Krempel/Type> gfortran type.f90
type.f90:8:12:
type X
2
end type
integer :: q
real :: a
integer, parameter :: h=3
type(X) :: X
1
Error: Symbol Âx at (1) also declared as a type at (2)
I do not know why the intermediate lines between the type definition
and the delcaration of X are also printed.