public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101943] New: [12 Regression] ICE: Segmentation fault (in cat_tag_for)
@ 2021-08-17  6:19 asolokha at gmx dot com
  2021-08-17  6:25 ` [Bug c++/101943] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2021-08-17  6:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101943
           Summary: [12 Regression] ICE: Segmentation fault (in
                    cat_tag_for)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-12.0.0-alpha20210815 snapshot (g:bbf19f9c20515da9fcd23f08c8139427374e8d77)
ICEs when compiling the following testcase, extracted from
test/CXX/class/class.compare/class.compare.default/p2.cpp from the clang 12.0.0
test suite, w/ -std=c++20:

struct A1 {
  int x;

  bool operator<=>(const A1&) const = default;
};

void f(A1 a) {
  void(a <=> a);
}

% gcc-12.0.0 -std=c++20 -c xbo4cxcm.cpp
xbo4cxcm.cpp: In function 'void f(A1)':
xbo4cxcm.cpp:8:14: error: use of deleted function 'constexpr bool
A1::operator<=>(const A1&) const'
    8 |   void(a <=> a);
      |              ^
xbo4cxcm.cpp:4:8: note: 'constexpr bool A1::operator<=>(const A1&) const' is
implicitly deleted because the default definition would be ill-formed:
    4 |   bool operator<=>(const A1&) const = default;
      |        ^~~~~~~~
xbo4cxcm.cpp:2:7: error: 'strong_ordering' is not a member of 'std'
    2 |   int x;
      |       ^
xbo4cxcm.cpp:1:1: note: 'std::strong_ordering' is defined in header
'<compare>'; did you forget to '#include <compare>'?
  +++ |+#include <compare>
    1 | struct A1 {
xbo4cxcm.cpp:2:7: note: forming type of 'operator<=>'
    2 |   int x;
      |       ^
xbo4cxcm.cpp:4:8: internal compiler error: Segmentation fault
    4 |   bool operator<=>(const A1&) const = default;
      |        ^~~~~~~~
0x11210bf crash_signal
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/toplev.c:328
0xa03000 cat_tag_for
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/method.c:1032
0xa05302 genericize_spaceship(unsigned int, tree_node*, tree_node*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/method.c:1076
0xa05ecb build_comparison_op
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/method.c:1507
0xa0d92c maybe_explain_implicit_delete(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/method.c:2749
0x9bffd5 mark_used(tree_node*, int)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/decl2.c:5658
0x90717e build_over_call
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/call.c:9557
0x90d9d0 build_new_op_1
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/call.c:6547
0x90e18d build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node**, int)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/call.c:6806
0xb5516d build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node**, int)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/typeck.c:4330
0xa6acb8 cp_parser_binary_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:10062
0xa6b45d cp_parser_assignment_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:10200
0xa6fcb6 cp_parser_parenthesized_expression_list
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:8310
0xa70b12 cp_parser_functional_cast
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:31561
0xa810b0 cp_parser_postfix_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:7492
0xa6ab02 cp_parser_binary_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:9896
0xa6b45d cp_parser_assignment_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:10200
0xa6ca82 cp_parser_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:10370
0xa70298 cp_parser_expression_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:12539
0xa7c2f3 cp_parser_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210815/work/gcc-12-20210815/gcc/cp/parser.c:12335

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/101943] [12 Regression] ICE: Segmentation fault (in cat_tag_for)
  2021-08-17  6:19 [Bug c++/101943] New: [12 Regression] ICE: Segmentation fault (in cat_tag_for) asolokha at gmx dot com
@ 2021-08-17  6:25 ` pinskia at gcc dot gnu.org
  2021-08-17  6:27 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-17  6:25 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
dup of bug 94162.

*** This bug has been marked as a duplicate of bug 94162 ***

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/101943] [12 Regression] ICE: Segmentation fault (in cat_tag_for)
  2021-08-17  6:19 [Bug c++/101943] New: [12 Regression] ICE: Segmentation fault (in cat_tag_for) asolokha at gmx dot com
  2021-08-17  6:25 ` [Bug c++/101943] " pinskia at gcc dot gnu.org
@ 2021-08-17  6:27 ` pinskia at gcc dot gnu.org
  2021-08-17  6:31 ` [Bug c++/101943] " pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-17  6:27 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |---

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/101943] ICE: Segmentation fault (in cat_tag_for)
  2021-08-17  6:19 [Bug c++/101943] New: [12 Regression] ICE: Segmentation fault (in cat_tag_for) asolokha at gmx dot com
  2021-08-17  6:25 ` [Bug c++/101943] " pinskia at gcc dot gnu.org
  2021-08-17  6:27 ` pinskia at gcc dot gnu.org
@ 2021-08-17  6:31 ` pinskia at gcc dot gnu.org
  2021-08-17  6:33 ` pinskia at gcc dot gnu.org
  2023-08-08 15:46 ` arthur.j.odwyer at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-17  6:31 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12 Regression] ICE:        |ICE: Segmentation fault (in
                   |Segmentation fault (in      |cat_tag_for)
                   |cat_tag_for)                |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-08-17
           Keywords|                            |error-recovery
     Ever confirmed|0                           |1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/101943] ICE: Segmentation fault (in cat_tag_for)
  2021-08-17  6:19 [Bug c++/101943] New: [12 Regression] ICE: Segmentation fault (in cat_tag_for) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-08-17  6:31 ` [Bug c++/101943] " pinskia at gcc dot gnu.org
@ 2021-08-17  6:33 ` pinskia at gcc dot gnu.org
  2023-08-08 15:46 ` arthur.j.odwyer at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-17  6:33 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-checking

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, still crashes in 20210816. The crash is hidden because of a previous
error on the release branches so this is not a regression.

That is:
<source>:5: confused by earlier errors, bailing out

Is really an ICE just hidden from the user.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/101943] ICE: Segmentation fault (in cat_tag_for)
  2021-08-17  6:19 [Bug c++/101943] New: [12 Regression] ICE: Segmentation fault (in cat_tag_for) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-08-17  6:33 ` pinskia at gcc dot gnu.org
@ 2023-08-08 15:46 ` arthur.j.odwyer at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2023-08-08 15:46 UTC (permalink / raw)
  To: gcc-bugs

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

Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arthur.j.odwyer at gmail dot com

--- Comment #4 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
This seems to be fixed since GCC 11.1; should it be RESOLVED FIXED at this
point?
https://godbolt.org/z/Tox8f716q

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-08 15:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17  6:19 [Bug c++/101943] New: [12 Regression] ICE: Segmentation fault (in cat_tag_for) asolokha at gmx dot com
2021-08-17  6:25 ` [Bug c++/101943] " pinskia at gcc dot gnu.org
2021-08-17  6:27 ` pinskia at gcc dot gnu.org
2021-08-17  6:31 ` [Bug c++/101943] " pinskia at gcc dot gnu.org
2021-08-17  6:33 ` pinskia at gcc dot gnu.org
2023-08-08 15:46 ` arthur.j.odwyer at gmail dot com

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).