This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36492] incorrect error when compiling
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2008 18:10:46 -0000
- Subject: [Bug fortran/36492] incorrect error when compiling
- References: <bug-36492-15125@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from burnus at gcc dot gnu dot org 2008-06-13 18:10 -------
OK, I can reproduce it now. Workaround: Replacing -std=f2003 by -std=gnu.
First program, causes an ICE. g95 prints
"Error: Symbol 'max_fld_hed' at (1) has no IMPLICIT type"
------------------------------------------------------
MODULE WinData
IMPLICIT NONE
INTEGER (1), PARAMETER :: MAXFLD = 25_1, MAXHED = 5_1, MAXCHR = 80_1
integer :: i
TYPE TWindowData
CHARACTER (MAX_FLD_HED, 1) :: DWFdHd(MAXFLD) = [(" ", i = 1, MAXFLD)]
END TYPE TWindowData
END MODULE WinData
------------------------------------------------------
Reduced test case - compile with -std=f2003
------------------------------------------------------
INTEGER, PARAMETER :: len = 40
type t
character (len, 1) :: DWFdHd(1) = [(" ", i = 1, 1)]
end type t
end
------------------------------------------------------
Error: The CHARACTER elements of the array constructor at (1) must have the
same length (1/40)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic, ice-on-invalid-
| |code
Last reconfirmed|0000-00-00 00:00:00 |2008-06-13 18:10:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36492