public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Matthew Fortune" <mfortune@gmail.com>
To: "'Jason Merrill'" <jason@redhat.com>
Cc: "'gcc-patches List'" <gcc-patches@gcc.gnu.org>
Subject: RE: [PATCH] Fix ICE caused by a missing check for DECL_LANG_SPECIFIC
Date: Fri, 02 Mar 2018 13:26:00 -0000	[thread overview]
Message-ID: <1047e01d3b229$feea7d60$fcbf7820$@gmail.com> (raw)
In-Reply-To: <CADzB+2mt49af=fK5aSrCb0-UsmnmZ7WizFEh7kwmL5O=wGSv3w@mail.gmail.com>

Jason Merrill <jason@redhat.com> writes:
> On Thu, Mar 1, 2018 at 7:02 AM, Matthew Fortune <mfortune@gmail.com>
> wrote:
> > Hi,
> >
> > It seems we have had a bug for some time that causes an ICE and
> prevents the
> > MIPS16 library builds from completing but is likely unrelated to
> MIPS16.
> > The problem is when we call target_reinit and library functions get
> created
> > as shown in the call stack at the end of this message. The first
> builtin
> > that triggers the problem happens to be one of the MIPS16 helpers but
> I
> > don't think there is anything unique about it. The issue appeared
> after some
> > refactoring work in r253600 where code testing DECL_CLASS_SCOPE_P and
> > DECL_FRIEND_P was previously guarded by a check for
> DECL_LANG_SPECIFIC but
> > not after.
> >
> > https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00604.html
> >
> > I don’t know if this is the correct solution or whether we need to
> change the
> > way builtins are initialised in the MIPS backend but I suspect this
> fix
> > is the right way to go.
> >
> > Cc: Jason as author of the original change.
> >
> > Thanks,
> > Matthew
> >
> > gcc/cp/
> >         * pt.c (type_dependent_expression_p): Add missing check for
> >         DECL_LANG_SPECIFIC.
> > ---
> >  gcc/cp/pt.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
> > index 7345119..c88304f 100644
> > --- a/gcc/cp/pt.c
> > +++ b/gcc/cp/pt.c
> > @@ -24635,6 +24635,7 @@ type_dependent_expression_p (tree expression)
> >       type-dependent.  Checking this is important for functions with
> auto return
> >       type, which looks like a dependent type.  */
> >    if (TREE_CODE (expression) == FUNCTION_DECL
> > +      && DECL_LANG_SPECIFIC (expression)
> >        && !(DECL_CLASS_SCOPE_P (expression)
> >            && dependent_type_p (DECL_CONTEXT (expression)))
> >        && !(DECL_FRIEND_P (expression)
> 
> I think we want to go into this block when DECL_LANG_SPECIFIC is NULL.
> Does this also fix the issue for you?

Thanks. Yes, this fixes it too. I wasn't sure which of the accessors were
dependent on DECL_LANG_SPECIFIC so ended up with a sledgehammer. 

Matthew

  reply	other threads:[~2018-03-02 13:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 12:02 Matthew Fortune
2018-03-01 19:34 ` Jason Merrill
2018-03-02 13:26   ` Matthew Fortune [this message]
2018-03-02 17:04     ` Jason Merrill

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='1047e01d3b229$feea7d60$fcbf7820$@gmail.com' \
    --to=mfortune@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    /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).