public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113389] New: ICE when explicit object parameter is not declared as the first parameter
@ 2024-01-14 17:14 cooky.ykooc922 at gmail dot com
  2024-01-15 18:47 ` [Bug c++/113389] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: cooky.ykooc922 at gmail dot com @ 2024-01-14 17:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113389
           Summary: ICE when explicit object parameter is not declared as
                    the first parameter
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cooky.ykooc922 at gmail dot com
  Target Milestone: ---

Although it is obviously an error, it causes ICE:

struct A {
    void foo(A, this A);
};

compiler output:
<source>:3:17: error: Only the first parameter of a member function can be
declared as an explicit object parameter
    3 |     void foo(A, this A);
      |                 ^~~~~~
<source>:3:23: internal compiler error: Segmentation fault
    3 |     void foo(A, this A);
      |                       ^
0x2640d5c internal_error(char const*, ...)
        ???:0
0xa78793 perform_implicit_conversion_flags(tree_node*, tree_node*, int, int)
        ???:0
0xb18083 check_default_argument(tree_node*, tree_node*, int)
        ???:0
0xb1861f grokparms(tree_node*, tree_node**)
        ???:0
0xb2caa1 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        ???:0
0xb50ff3 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
        ???:0
0xc5214a c_parse_file()
        ???:0
0xda5b49 c_common_parse_file()
        ???:0

godbolt link with -std=c++23: https://godbolt.org/z/Mxefo3nj6

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

end of thread, other threads:[~2024-01-20 17:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-14 17:14 [Bug c++/113389] New: ICE when explicit object parameter is not declared as the first parameter cooky.ykooc922 at gmail dot com
2024-01-15 18:47 ` [Bug c++/113389] " mpolacek at gcc dot gnu.org
2024-01-17 23:23 ` mpolacek at gcc dot gnu.org
2024-01-18 14:12 ` cvs-commit at gcc dot gnu.org
2024-01-18 15:01 ` mpolacek at gcc dot gnu.org
2024-01-20 17:09 ` pinskia at gcc dot gnu.org

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