public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/101839] [10/11/12/13 Regression] Hang in C++ code with -fdevirtualize
Date: Wed, 10 Aug 2022 13:19:38 +0000	[thread overview]
Message-ID: <bug-101839-4-Kyo52jR0oq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101839-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Thanks for looking into this.  
What happens here is that we start working from a call where we know that
outer_type is BA. We correctly find the BA::type and notice that it is final
and thus we do not need to look for sucessors to find something.

However we later decide to discard it here:

3241          if (type_possibly_instantiated_p (outer_type->type))
3244            skipped = true;

This is trying to check, for anonymous types, the possibility that a given
target is never going to be taken since type was never instantiated. It is true
that BA is not instantiated however its successor is.  So we need to keep track
that we saw FINAL and in that case extend type_possibly_instantiated_p to also
look for all derived types. This is quite ugly mistake I got in as the
possibly_instantiated code was implemented before we got DECL_FINAl flag.

I will prepare patch.

  parent reply	other threads:[~2022-08-10 13:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10  7:02 [Bug ipa/101839] New: [9/10/11/12 Regression] Hand " marxin at gcc dot gnu.org
2021-08-10  7:04 ` [Bug ipa/101839] " marxin at gcc dot gnu.org
2021-08-10  7:09 ` marxin at gcc dot gnu.org
2021-08-10  7:13 ` [Bug ipa/101839] [9/10/11/12 Regression] Hang " rguenth at gcc dot gnu.org
2021-08-10  7:33 ` redi at gcc dot gnu.org
2022-05-27  9:45 ` [Bug ipa/101839] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:45 ` jakub at gcc dot gnu.org
2022-07-29 12:24 ` rguenth at gcc dot gnu.org
2022-08-10  3:53 ` yinyuefengyi at gmail dot com
2022-08-10 13:19 ` hubicka at gcc dot gnu.org [this message]
2022-08-10 13:44 ` hubicka at gcc dot gnu.org
2022-08-12 14:27 ` hubicka at gcc dot gnu.org
2022-08-15 13:57 ` [Bug ipa/101839] [10/11/12 " marxin at gcc dot gnu.org
2023-04-27 13:21 ` [Bug ipa/101839] [10/11 " rguenth at gcc dot gnu.org
2023-07-07 10:40 ` [Bug ipa/101839] [11 " rguenth 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-101839-4-Kyo52jR0oq@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).