public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110114] New: ICE on calling overloaded function in case of incomplete argument type
@ 2023-06-04 17:46 fchelnokov at gmail dot com
  2023-06-04 19:00 ` [Bug c++/110114] [13/14 Regression] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: fchelnokov at gmail dot com @ 2023-06-04 17:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

end of thread, other threads:[~2024-05-21  9:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-04 17:46 [Bug c++/110114] New: ICE on calling overloaded function in case of incomplete argument type fchelnokov at gmail dot com
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

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