public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/94162] ICE [neg] bad return type in defaulted <=>
Date: Mon, 09 Aug 2021 09:03:44 +0000	[thread overview]
Message-ID: <bug-94162-4-XYUl3qPgs4@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94162-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
At least the #c8 testcase got fixed with
r12-619-gfc178519771db508c03611cff4a1466cf67fce1d
but that hasn't been backported to 11.x.

The ICE with int * return type is because POINTER_TYPE has NULL
TYPE_LINKAGE_IDENTIFIER, and cat_type_for is called on such type.
--- gcc/cp/method.c.jj  2021-06-28 22:38:27.014617793 +0200
+++ gcc/cp/method.c     2021-08-09 10:59:02.324443669 +0200
@@ -1029,6 +1029,8 @@ is_cat (tree type, comp_cat_tag tag)
 static comp_cat_tag
 cat_tag_for (tree type)
 {
+  if (!TYPE_LINKAGE_IDENTIFIER (type))
+    return cc_last;
   for (int i = 0; i < cc_last; ++i)
     {
       comp_cat_tag tag = (comp_cat_tag)i;
would fix this (or shall we instead test if (!CLASS_TYPE_P (type)) or something
similar?

  parent reply	other threads:[~2021-08-09  9:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 23:47 [Bug c++/94162] New: " dacamara.cameron at gmail dot com
2020-03-13 10:21 ` [Bug c++/94162] " jakub at gcc dot gnu.org
2020-03-14 21:45 ` dacamara.cameron at gmail dot com
2020-08-18 13:36 ` mpolacek at gcc dot gnu.org
2020-08-18 13:37 ` mpolacek at gcc dot gnu.org
2020-08-18 13:38 ` mpolacek at gcc dot gnu.org
2020-08-18 13:39 ` mpolacek at gcc dot gnu.org
2021-03-08 16:31 ` jakub at gcc dot gnu.org
2021-03-08 16:32 ` jakub at gcc dot gnu.org
2021-08-05  8:55 ` pinskia at gcc dot gnu.org
2021-08-08 17:56 ` dacamara.cameron at gmail dot com
2021-08-08 21:05 ` pinskia at gcc dot gnu.org
2021-08-09  9:03 ` jakub at gcc dot gnu.org [this message]
2021-08-12  7:34 ` cvs-commit at gcc dot gnu.org
2021-08-17  6:25 ` pinskia at gcc dot gnu.org
2023-08-08 15:49 ` arthur.j.odwyer at gmail dot com
2024-06-15  2:23 ` sjames 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-94162-4-XYUl3qPgs4@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).