public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/95690] [11 Regression] ICE in set_mem_attributes_minus_bitpos, at emit-rtl.c:2092
Date: Tue, 16 Jun 2020 07:30:02 +0000	[thread overview]
Message-ID: <bug-95690-4-3cfrdgYMW8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95690-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95690

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p t
$1 = <paren_expr 0x7ffff6d67940>
(gdb) p debug_generic_expr (t)
((erfc))

so that's the DECL_INITIAL of a CONST_DECL.  The CONST_DECL is built that
way by the FE:

8833      /* Create a temporary var to hold the value.  */
8834      if (TREE_CONSTANT (se->expr))
8835        {
8836          tree tmp = se->expr;
8837          STRIP_TYPE_NOPS (tmp);
8838          var = build_decl (input_location,
8839                            CONST_DECL, NULL, TREE_TYPE (tmp));
8840          DECL_INITIAL (var) = tmp;

and the middle-end doesn't really expect PAREN_EXPRs.  I don't see any
stripping of other codes on the path to the ICE so I'll amend what is already
there.  But IMHO build_constant_desc shouldn't pass the constant expression
to be used as MEM_EXPR, instead passing down the type looks more appropriate
and future-proof...

  parent reply	other threads:[~2020-06-16  7:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 18:46 [Bug fortran/95690] New: " gscfq@t-online.de
2020-06-15 19:05 ` [Bug fortran/95690] " marxin at gcc dot gnu.org
2020-06-15 19:13 ` dominiq at lps dot ens.fr
2020-06-16  6:41 ` rguenth at gcc dot gnu.org
2020-06-16  7:30 ` rguenth at gcc dot gnu.org [this message]
2020-06-16 11:57 ` cvs-commit at gcc dot gnu.org
2020-06-16 11:57 ` rguenth at gcc dot gnu.org
2020-06-23 13:31 ` cvs-commit 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-95690-4-3cfrdgYMW8@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: link
Be 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).