From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A07EB3858C62; Thu, 24 Nov 2022 21:55:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A07EB3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669326924; bh=QaKHEAD+vtHb68RdrycAZgo8PNmJU6CwQRHaMhbthfI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qXDMIrIpj873zirohvPDQGycD6rttfZHBOsQo29yBLM7ai1eUGnoYTJ0H9g8PWape OR0KBNMjclG2RYjzRhm19g1iz29mnw/KRPfzjNoepYNXWCg3CG3mgaq8rXtrv2BPC0 0Nno8252Z5vAiC4zcFSd6sN5zG0/ZViy3rRmaZ14= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107864] [10/11/12/13 Regression] ICE (seg fault) in check_return_expr or instantiate_body with concepts and specialized version Date: Thu, 24 Nov 2022 21:55:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc Message-ID: In-Reply-To: References: 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=3D107864 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[10/11/12/13 Regression] |[10/11/12/13 Regression] |ICE (seg fault) in |ICE (seg fault) in |check_return_expr with |check_return_expr or |concepts and specialized |instantiate_body with |version |concepts and specialized | |version --- Comment #6 from Andrew Pinski --- Note without the concept there, GCC does not ICE. Note changing it slightly (remove the if return type): template void j( T const& val ) requires true {} template<> void j( int const& val ) { } void g() { j(1); } --- CUT --- Gives a different ICE: t.cc: In instantiation of =E2=80=98void j(const T&) requires true [with T = =3D int]=E2=80=99: t.cc:5:4: required from here t.cc:2:39: internal compiler error: Segmentation fault 2 | void j( T const& val ) requires true {} | ^ 0x120e72f crash_signal /home/apinski/src/upstream-gcc/gcc/gcc/toplev.cc:314 0xbd42d1 instantiate_body /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:26494 0xbd52ba instantiate_decl(tree_node*, bool, bool) /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:26774 0xbf2b2b instantiate_pending_templates(int) /home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.cc:26852 0xaaa7fb c_parse_final_cleanups() /home/apinski/src/upstream-gcc/gcc/gcc/cp/decl2.cc:4940 0xcd38b0 c_common_parse_file() /home/apinski/src/upstream-gcc/gcc/gcc/c-family/c-opts.cc:1266 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.=