This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/50070] Segmentation fault at size_binop_loc in fold-const.c


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]