public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fchelnokov at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/110114] New: ICE on calling overloaded function in case of incomplete argument type
Date: Sun, 04 Jun 2023 17:46:01 +0000	[thread overview]
Message-ID: <bug-110114-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 110114
           Summary: ICE on calling overloaded function in case of
                    incomplete argument type
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fchelnokov at gmail dot com
  Target Milestone: ---

This program

struct A {
    int a,b;
};

struct B;

void foo(const A &) {}
void foo(const B &) {}

int main() {
    foo({.a=0});
}

is accepted by Clang and MSVC, but GCC 13 crashes on it with the message:

<source>:11:8: internal compiler error: Segmentation fault
   11 |     foo({.a=0});
      |     ~~~^~~~~~~~
0x1ce67fe internal_error(char const*, ...)
        ???:0
0x751149 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ???:0
0x8eaa5c finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ???:0
0x89f99b c_parse_file()
        ???:0
0x98c2b9 c_common_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Online demo: https://godbolt.org/z/z7KPGrWsz

             reply	other threads:[~2023-06-04 17:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-04 17:46 fchelnokov at gmail dot com [this message]
2023-06-04 19:00 ` [Bug c++/110114] [13/14 Regression] " pinskia at gcc dot gnu.org
2023-06-04 19:02 ` pinskia at gcc dot gnu.org
2023-06-05 20:27 ` [Bug c++/110114] [13/14 Regression] ICE on calling overloaded function in case of incomplete argument type and C++ designated initializers mpolacek at gcc dot gnu.org
2023-07-18 21:54 ` mpolacek at gcc dot gnu.org
2023-07-18 22:05 ` mpolacek at gcc dot gnu.org
2023-07-20 14:33 ` cvs-commit at gcc dot gnu.org
2023-07-20 14:53 ` [Bug c++/110114] [13 " mpolacek at gcc dot gnu.org
2023-07-20 16:06 ` mpolacek at gcc dot gnu.org
2023-07-27  9:26 ` rguenth at gcc dot gnu.org
2024-05-21  9:15 ` jakub 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-110114-4@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).