From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D89943858409; Thu, 20 Jul 2023 16:51:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D89943858409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689871892; bh=v/S7rSi4AWFCyT1I+goZ2LjvKDheO60xCep8UskdpYA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ElbApCTsaWOduCAaP3lubtSWuOX/fHx8DoPjoDcVwXnUEgOec43LmFNCb+PIBHQZ0 h15yUbypK2iySOzdir+QisbH97xBJCDVsizip3IJyXoMijep/R0iWSTAfu5cIrV5+6 227PSJKc0tmfwko5gAk289tDWpvcxPcwq1LuYsg8= From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110197] [13/14 Regression] Empty constexpr object constructor erronously claims out of range access Date: Thu, 20 Jul 2023 16:51:32 +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.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D110197 --- Comment #4 from Patrick Palka --- Looks like this issue isn't specific to constexpr array construction: struct Currency { constexpr Currency(int) { } }; constexpr int f() { return __builtin_is_constant_evaluated(); }; struct A { Currency _M_elems; }; constexpr A _M_elems =3D {Currency{f()}}; Since r13-963 we reject this with :8:38: error: =E2=80=98A{(void)0}=E2=80=99 is not a constant express= ion=