This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47850] [4.6 Regression] ICE in gfc_conv_array_initializer
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 1 Mar 2011 12:45:50 +0000
- Subject: [Bug fortran/47850] [4.6 Regression] ICE in gfc_conv_array_initializer
- Auto-submitted: auto-generated
- References: <bug-47850-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47850
--- Comment #7 from Paul Thomas <pault at gcc dot gnu.org> 2011-03-01 12:45:34 UTC ---
(In reply to comment #5)
> (In reply to comment #3)
> > -std=f95 no longer generates the error that it should:
> > logical, parameter :: buf(3) = [(any(sc(i) ==nc), i = 1, 3)]
> > 1
> > Error: transformational intrinsic 'any' at (1) is not permitted in an
> > initialization expression
>
> Ignoring the issue of [ ] vs. (/ /) which kicks in first: gfortran 4.4
> diagnoses this, 4.5/4.6 do not.
>
> I think one reason that the error no longer is shown is the change with regards
> to constant vs. initialization expression. Fortran 2003 merged the two concepts
> to the name "initialization expressions" (which were renamed to "constant
> expressions" in F2008) - but in Fortran 95 not every constant expression was an
> initialization expression and some places mandated an initialization
> expression. F95 had:
Well regardless of the evolution of the standard, I expect that -std=f95 would
know the difference between the two.
Cheers
Paul