This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50070] Segmentation fault at size_binop_loc in fold-const.c
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 14 Aug 2011 12:02:57 +0000
- Subject: [Bug fortran/50070] Segmentation fault at size_binop_loc in fold-const.c
- Auto-submitted: auto-generated
- References: <bug-50070-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50070
--- Comment #4 from janus at gcc dot gnu.org 2011-08-14 12:02:57 UTC ---
(In reply to comment #3)
> The relevant quote from the F08 std is probably:
>
> "C417 (R422) A type-param-value in a char-length shall be a colon, asterisk, or
> speciïcation-expr."
>
> together with chapter 7.1.11 ("Speciïcation expression").
Based on chapter 7.1.11, I would say that g95's error message is wrong: z does
not have to have constant length.
"A speciïcation-expr shall be a constant expression unless it is in an
interface body (12.4.3.2), the speciïcation part of a subprogram or BLOCK
construct, a derived type deïnition, or the declaration-type-spec of a FUNCTION
statement (12.6.2.2)."
Since z is in the specification part of a subprogram, there is no need for to
have constant length.