public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45170] [F2003] allocatable character lengths Date: Mon, 29 Aug 2011 16:32:00 -0000 [thread overview] Message-ID: <bug-45170-4-eRArRSbhqx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-45170-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45170 --- Comment #27 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2011-08-29 16:22:16 UTC --- On Mon, Aug 29, 2011 at 06:47:41AM +0000, burnus at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45170 > > --- Comment #26 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-29 06:47:41 UTC --- > (In reply to comment #24) > > Your code in comment #14 is (I believe) invalid, and gfortran > > is issuing the correct error message. > > I get: > Error: Variable 'length' cannot appear in the expression at (1) > > However, I believe that > allocate(character(len=length)::string) > is valid. > > One has (F2008): > R626 allocate-stmt is ALLOCATE ( [ type-spec :: ] allocation-list > [, alloc-opt-list ] ) > with > R402 type-spec is intrinsic-type-spec or derived-type-spec > with > R404 intrinsic-type-spec is [...] > or CHARACTER [ char-selector ] > with > R420 char-selector is length-selector [or ...] > with > R421 length-selector is ( [ LEN = ] type-param-value ) [or ...] > >From F2003: C402 (R402) The type-param-value for a kind type parameter shall be an initialization expression. 7.1.7 An initialization expression is an expression with limitations that make it suitable for use as a kind type parameter, initializer, or named constant. It is an expression in which each operation is intrinsic, and each primary is (1) A constant or subobject of a constant, character(:),allocatable::string integer::length length=5 allocate(character(len=length)::string) length is not a constant.
next prev parent reply other threads:[~2011-08-29 16:23 UTC|newest] Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-45170-4@http.gcc.gnu.org/bugzilla/> 2010-11-02 17:10 ` burnus at gcc dot gnu.org 2010-11-02 22:32 ` burnus at gcc dot gnu.org 2011-01-27 22:42 ` burnus at gcc dot gnu.org 2011-01-28 14:30 ` pault at gcc dot gnu.org 2011-01-28 15:45 ` burnus at gcc dot gnu.org 2011-01-28 20:59 ` tkoenig at gcc dot gnu.org 2011-01-30 18:17 ` pault at gcc dot gnu.org 2011-02-02 18:09 ` dnovillo at gcc dot gnu.org 2011-02-02 18:18 ` dnovillo at gcc dot gnu.org 2011-07-12 13:51 ` boschmann at tp1 dot physik.uni-siegen.de 2011-07-12 14:20 ` sgk at troutmask dot apl.washington.edu 2011-07-12 14:46 ` burnus at gcc dot gnu.org 2011-07-12 15:01 ` boschmann at tp1 dot physik.uni-siegen.de 2011-07-15 14:04 ` burnus at gcc dot gnu.org 2011-08-09 2:11 ` damian at rouson dot net 2011-08-09 3:48 ` kargl at gcc dot gnu.org 2011-08-09 4:28 ` damian at rouson dot net 2011-08-09 5:09 ` sgk at troutmask dot apl.washington.edu 2011-08-26 11:10 ` boschmann at tp1 dot physik.uni-siegen.de 2011-08-26 19:36 ` sgk at troutmask dot apl.washington.edu 2011-08-26 20:19 ` boschmann at tp1 dot physik.uni-siegen.de 2011-08-29 7:20 ` burnus at gcc dot gnu.org 2011-08-29 16:32 ` sgk at troutmask dot apl.washington.edu [this message] 2011-08-29 17:23 ` burnus at gcc dot gnu.org 2011-08-30 15:41 ` kargl at gcc dot gnu.org 2011-08-30 19:01 ` damian at rouson dot net 2011-08-30 19:45 ` sgk at troutmask dot apl.washington.edu 2012-05-13 10:56 ` burnus at gcc dot gnu.org 2012-05-13 13:10 ` burnus at gcc dot gnu.org 2012-05-15 13:09 ` burnus at gcc dot gnu.org 2012-05-23 20:39 ` burnus at gcc dot gnu.org 2012-05-23 20:48 ` burnus at gcc dot gnu.org 2012-05-24 13:39 ` burnus at gcc dot gnu.org 2012-06-16 18:14 ` burnus at gcc dot gnu.org 2012-06-16 18:29 ` burnus at gcc dot gnu.org 2013-02-05 16:34 ` infinity.probability at gmail dot com 2013-02-05 16:37 ` infinity.probability at gmail dot com 2013-02-05 20:23 ` janus at gcc dot gnu.org 2013-06-13 7:23 ` burnus at gcc dot gnu.org 2013-06-14 7:43 ` burnus at gcc dot gnu.org 2013-09-02 11:26 ` dominiq at lps dot ens.fr 2015-06-04 9:28 ` tkoenig at gcc dot gnu.org 2015-09-03 21:18 ` dominiq at lps dot ens.fr 2010-08-03 1:55 [Bug fortran/45170] New: suspected bug in error generated by allocatable character array clerman at fuse dot net 2010-08-03 5:43 ` [Bug fortran/45170] [F2003] allocatable character lengths burnus at gcc dot gnu dot org 2010-08-03 10:25 ` clerman at fuse dot net 2010-08-15 18:46 ` kargl at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-45170-4-eRArRSbhqx@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).