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/56378] [4.6/4.7/4.8 Regression] gfortran internal compiler error Date: Mon, 18 Feb 2013 20:09:00 -0000 [thread overview] Message-ID: <bug-56378-4-5NXgJNZymw@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-56378-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56378 --- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-02-18 20:08:36 UTC --- (In reply to comment #5) ... > function int_fvec2vec (f_vec, n) result (c_vec) > integer f_vec(:) ... > subroutine lat_to_c (Fp, C) bind(c) ... > call lat_to_c2 (c_loc(fvec2vec(ic, n1_ic))) I get – with my half-working patch http://gcc.gnu.org/ml/fortran/2013-02/msg00085.html: call lat_to_c2 (c_loc(fvec2vec(ic, n1_ic))) 1 Error: Argument X at (1) to C_LOC shall be either a POINTER or have the TARGET attribute And I believe that the error is valid. The function result of "fvec2vec" (alias int_fvec2vec) ceases to exist immediately after the function returned – and is thus not suitable for C_LOC. In that case, not even TARGET would help, only POINTER. The example in comment 6 and the original example (for "c_loc(fvec2vec" and "c_loc(tensor2vec") give the same error. Thus, it is merely an ICE-on-invalid code/diagnostic bug. To add some quotes from the standard (F2008, "15.2.3.6 C LOC (X)" – unchanged with TS29113): "Argument. X shall have either the POINTER or TARGET attribute."
next prev parent reply other threads:[~2013-02-18 20:09 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-02-18 16:26 [Bug fortran/56378] New: " david.sagan at gmail dot com 2013-02-18 16:34 ` [Bug fortran/56378] " kargl at gcc dot gnu.org 2013-02-18 16:35 ` david.sagan at gmail dot com 2013-02-18 16:36 ` david.sagan at gmail dot com 2013-02-18 18:21 ` Joost.VandeVondele at mat dot ethz.ch 2013-02-18 18:48 ` Joost.VandeVondele at mat dot ethz.ch 2013-02-18 19:22 ` dominiq at lps dot ens.fr 2013-02-18 19:56 ` [Bug fortran/56378] [4.6/4.7/4.8 Regression] " janus at gcc dot gnu.org 2013-02-18 20:09 ` burnus at gcc dot gnu.org [this message] 2013-03-06 10:35 ` [Bug fortran/56378] [4.6/4.7/4.8 Regression] ICE with C_LOC rguenth at gcc dot gnu.org 2013-03-25 15:54 ` [Bug fortran/56378] [4.6/4.7/4.8/4.9 " burnus at gcc dot gnu.org 2013-03-29 8:24 ` [Bug fortran/56378] [4.6/4.7/4.8 " Joost.VandeVondele at mat dot ethz.ch 2013-04-12 15:15 ` [Bug fortran/56378] [4.7/4.8 " jakub at gcc dot gnu.org 2013-08-21 15:01 ` janus at gcc dot gnu.org 2014-06-12 13:41 ` rguenth at gcc dot gnu.org 2014-07-11 7:07 ` [Bug fortran/56378] [4.8 " 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-56378-4-5NXgJNZymw@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).