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/50718] [4.6/4.7 Regression] ICE (fold_convert) with -fcheck=pointer Date: Thu, 13 Oct 2011 18:46:00 -0000 [thread overview] Message-ID: <bug-50718-4-FuKDZJHat3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-50718-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50718 --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-10-13 18:46:33 UTC --- Untested draft patch: --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -3344,2 +3344,4 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, { + tree arg; + if (attr.allocatable @@ -3359,6 +3361,12 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, + arg = parmse.expr; + + /* If the argument is passed by value, we need to strip the + INDIRECT_REF. */ + if (!POINTER_TYPE_P (TREE_TYPE (parmse.expr))) + arg = gfc_build_addr_expr (NULL_TREE, arg); cond = fold_build2_loc (input_location, EQ_EXPR, - boolean_type_node, parmse.expr, - fold_convert (TREE_TYPE (parmse.expr), + boolean_type_node, arg + fold_convert (TREE_TYPE (arg), null_pointer_node));
next prev parent reply other threads:[~2011-10-13 18:46 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-10-13 17:28 [Bug fortran/50718] New: " burnus at gcc dot gnu.org 2011-10-13 18:37 ` [Bug fortran/50718] " burnus at gcc dot gnu.org 2011-10-13 18:46 ` burnus at gcc dot gnu.org [this message] 2011-10-13 22:25 ` burnus at gcc dot gnu.org 2011-10-14 15:10 ` burnus at gcc dot gnu.org 2011-10-15 6:55 ` burnus at gcc dot gnu.org 2011-10-15 6:57 ` 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-50718-4-FuKDZJHat3@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).