This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45495] ICE: For character function with length specifier dependent on non-present arg
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Sep 2010 14:17:05 -0000
- Subject: [Bug fortran/45495] ICE: For character function with length specifier dependent on non-present arg
- References: <bug-45495-13399@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from kargl at gcc dot gnu dot org 2010-09-02 14:17 -------
(In reply to comment #2)
> Confirm: It compiles with g95 and NAG f95, but ICEs with gfortran (4.1 to 4.6)
> and a couple of other compilers.
>
> My feeling is that the program is invalid - at least in case the actual
> argument is not present.
Yes, the code is invalid. See restrictions on specification
expression. C710 and 3 lines down to item (2).
PS: I'm willing to bet that you can get g95 (and may be Nag)
to die on the code by replacing "jack = ''" in the subroutine
with a sufficiently long string on the RHS.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45495