public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/66969] Internal compiler error, segmentation fault Date: Fri, 02 Oct 2015 22:01:00 -0000 [thread overview] Message-ID: <bug-66969-4-u95MHqoHXH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-66969-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66969 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- I believe the code is invalid. Here a small rewrite program bug implicit none real, target, allocatable :: a(:,:) allocate(a(10,10)) a = 1.0 print*, f(a) contains function f(b) result(x) real, target, intent(in):: b(:,:) real, pointer :: c(:,:) real :: x(size(c(1,:))) c => b(1:2,:) x = c(2,:) end function f end program bug The line 'real :: x(size(c(1,:))' is referencing an unassociated pointer. If I add the 'integer :: n = size(c(1,:)) I get % gfc6 -c bug.f90 bug.f90:15:29: integer :: n = size(c(1,:)) 1 Error: Deferred array 'c' at (1) is not permitted in an initialization expression A similar error should probably occur here.
next prev parent reply other threads:[~2015-10-02 22:01 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-66969-4@http.gcc.gnu.org/bugzilla/> 2015-08-30 13:36 ` dominiq at lps dot ens.fr 2015-10-02 22:01 ` kargl at gcc dot gnu.org [this message] 2023-10-12 20:39 ` anlauf at gcc dot gnu.org 2023-10-15 20:23 ` anlauf 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-66969-4-u95MHqoHXH@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).