From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D59473858D1E; Sat, 24 Sep 2022 00:05:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D59473858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663977905; bh=21Yp74542nO30GqzyHdnSMy1RJpG/ZAqRal14cHC044=; h=From:To:Subject:Date:From; b=r66WQChz6sUsvJ7NzMGSJFS6LPQcNqDlL/MaF5NbzJtJwfAfhO9YrZbFZwbLfUSu8 +J9OMrK2VJiq65uWDLzFwhqh95CDa2/c4hsYsplxmeqolxkLCj4vsWTIb5MbM3AYRk DGlTQOgueLr2SIwv1tsFq7omF0Yg/wea+xM8kJQk= From: "bthomas at brave dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107023] New: [[gnu::stdcall]] Crashes the compiler, but __attribute__((stdcall)) and __stdcall worrks Date: Sat, 24 Sep 2022 00:05:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bthomas at brave dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107023 Bug ID: 107023 Summary: [[gnu::stdcall]] Crashes the compiler, but __attribute__((stdcall)) and __stdcall worrks Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bthomas at brave dot com Target Milestone: --- ``` #include template void call(T&& fn) {=20=20=20=20 std::cout< for instructions. ASM generation compiler returned: 4 g++: internal compiler error: Segmentation fault signal terminated program cc1plus Please submit a full bug report, with preprocessed source (by using -freport-bug). See for instructions. Execution build compiler returned: 4 --- Will give the error with O2 (12.2, Flags: -O2 -std=3Dc++20 -m32): g++: internal compiler error: Segmentation fault signal terminated program cc1plus Please submit a full bug report, with preprocessed source (by using -freport-bug). See for instructions. ASM generation compiler returned: 4 cc1plus: out of memory allocating 18446744072522246992 bytes after a total = of 2228224 bytes Execution build compiler returned: 1 --- Will give the error with ANY flags (13.0 - Trunk, Flags: -O2 -std=3Dc++20 -= m32): ' ' internal compiler error: error reporting routines re-entered. 0x2349dde internal_error(char const*, ...) ???:0 0x955fbc tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0x2368dec pp_format(pretty_printer*, text_info*) ???:0 0x236a1d5 pp_printf(pretty_printer*, char const*, ...) ???:0 0x2348785 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info= *) ???:0 0x2349dde internal_error(char const*, ...) ???:0 0x955fbc tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0x2368dec pp_format(pretty_printer*, text_info*) ???:0 0x236a1d5 pp_printf(pretty_printer*, char const*, ...) ???:0 0x2348785 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info= *) ???:0 0x2349dde internal_error(char const*, ...) ???:0 0x955fbc tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0xb992f8 lang_decl_name(tree_node*, int, bool) ???:0 0xb99346 lang_decl_dwarf_name(tree_node*, int, bool) ???:0 0xd8ab37 c_common_finalize_early_debug() ???:0 0xe78236 symbol_table::finalize_compilation_unit() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. ASM generation compiler returned: 1 ' ' internal compiler error: error reporting routines re-entered. 0x2349dde internal_error(char const*, ...) ???:0 0x955fbc tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0x2368dec pp_format(pretty_printer*, text_info*) ???:0 0x236a1d5 pp_printf(pretty_printer*, char const*, ...) ???:0 0x2348785 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info= *) ???:0 0x2349dde internal_error(char const*, ...) ???:0 0x955fbc tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0x2368dec pp_format(pretty_printer*, text_info*) ???:0 0x236a1d5 pp_printf(pretty_printer*, char const*, ...) ???:0 0x2348785 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info= *) ???:0 0x2349dde internal_error(char const*, ...) ???:0 0x955fbc tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0xb992f8 lang_decl_name(tree_node*, int, bool) ???:0 0xb99346 lang_decl_dwarf_name(tree_node*, int, bool) ???:0 0xd8ab37 c_common_finalize_early_debug() ???:0 0xe78236 symbol_table::finalize_compilation_unit() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. Execution build compiler returned: 1 ---- It's worth noting that `__attribute__((stdcall))` and `__stdcall` works just fine.=