public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47425] New: Array constructor with type-spec: Fails with more complicated length type expr Date: Mon, 24 Jan 2011 00:57:00 -0000 [thread overview] Message-ID: <bug-47425-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47425 Summary: Array constructor with type-spec: Fails with more complicated length type expr Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/397b3520a4dd1a9f# James Van Buskirk found an example for an Array constructor with type-spec, which fails at gimpling. Full example: See c.l.f. Short example: subroutine sub1(L,s,e) implicit none character(*) L integer s,e if(any(L(s:e+1) == [character(len(L(s:e))+1)::'that','those'])) then end if end subroutine sub1 Gives: test.f90:5:0: error: size of variable 'A.1' is too large Looking at the dump, one sees that the character length is strangely optimized away into two uninitialized variables. The dump has: sub1 (character(kind=1)[1:_l] & restrict l, integer(kind=4) & restrict s, integer(kind=4) & restrict e, integer(kind=4) _l) { bit_size_type D.1546; <unnamed-unsigned:64> D.1547; D.1546 = (bit_size_type) ((<unnamed-unsigned:64>) _l * 8); D.1547 = (<unnamed-unsigned:64>) (_l + -1) + 1; { static character(kind=1) A.1[2][1:MAX_EXPR <(D.1541 - D.1540) + 1, 0> + 1] = {"that", "those"}; and only much later: D.1540 = *s; D.1541 = *e;
next reply other threads:[~2011-01-23 22:39 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-01-24 0:57 burnus at gcc dot gnu.org [this message] 2011-06-30 19:42 ` [Bug fortran/47425] " dominiq at lps dot ens.fr 2013-07-15 20:33 ` burnus at gcc dot gnu.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-47425-4@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).