From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E03363858D33; Fri, 6 Jan 2023 06:22:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E03363858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672986130; bh=6unmE3TsfHPFM5qc3+pxxVGBsv2hpS6qxTB/HwvOumo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ceguSGUg8w6jenxC3xZIhNaXiL3kem1QGpiW6TZthnEg/TezVdQyliiTS1RlcCZxD tsxPhfu0Srqdr00Fk7cVkOBqf4dP67x8d6qj9+WHLZoG22dWw6+SxTqngMvJ/02wlB A2cHBbtAF157IT16PLtJVVzbDb5PRCnEpIbGk4/k= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108309] [12 Regression] ICE in in cxx_eval_component_reference, at cp/constexpr.cc:4136 Date: Fri, 06 Jan 2023 06:22:10 +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: 12.2.0 X-Bugzilla-Keywords: ice-on-valid-code, needs-bisection 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: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone keywords cf_known_to_fail short_desc cf_known_to_work everconfirmed bug_status cf_reconfirmed_on 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=3D108309 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |12.3 Keywords| |ice-on-valid-code, | |needs-bisection Known to fail| |12.2.0 Summary|ICE in in |[12 Regression] ICE in in |cxx_eval_component_referenc |cxx_eval_component_referenc |e, at cp/constexpr.cc:4136 |e, at cp/constexpr.cc:4136 Known to work| |11.3.0 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-01-06 --- Comment #2 from Andrew Pinski --- Reduced further: ``` struct _Enable_copy_move {}; struct h { union { int _M_value; }; }; struct m { constexpr m(...) : _M_payload() {} constexpr m(const m &) {} h _M_payload; }; struct optional : m, _Enable_copy_move { constexpr optional() {} template constexpr optional(_Up __t) : m(__t) {} }; struct array { optional t[1]; }; optional page { array {} }; ``` >clang++-15 doesn't (not sure if it's related, but i thought it's worth men= tioning: That is a conditionally supported construct in C++. clang does not support = it but GCC does.=20 GCC does warn with -Wconditionally-supported : : In instantiation of 'constexpr optional::optional(_Up) [with _Up = =3D array]': :20:1: required from here :14:62: warning: passing objects of non-trivially-copyable type 'st= ruct array' through '...' is conditionally supported [-Wconditionally-supported] 14 | template constexpr optional(_Up __t) : m(__t) {} | ^ Anyways this is fixed on the trunk; though since it is a GCC 12.x regressio= n it will/should be fixed on the GCC 12 branch too once someone figures out which patch fixed it.=