From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 840F93858D34; Wed, 1 May 2024 22:29:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 840F93858D34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714602599; bh=C1zEBla4rHIZZMRFILPByShu0P7KLeTLwhV72A4o+mk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cmQeva5w0On1CFkizcZawErJNH2dxBnBdZQuoRpBomfbNt8B17kqOnF8xJDolSUBb EEYmNRgGiuhBU08OszP4GmKLMNShAUfyt9TpwdG7n+/tP9KqlWg7hMPK0k2FDVSn4J HXijo2x4+QvZm8hXvDTPBzpNY8ver2XfSoB2CS3Q= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114913] "verify_gimple failed" due to addition of two constexpr strings Date: Wed, 01 May 2024 22:29:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 15.0 X-Bugzilla-Keywords: ice-checking, 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: --- 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=3D114913 --- Comment #3 from Andrew Pinski --- here is a C++11 testcase: ``` struct strt { char *_M_dataplus; char _M_local_buf=3D0; constexpr strt() : _M_dataplus(&_M_local_buf) {} constexpr strt(const strt &__str) : _M_dataplus(&_M_local_buf) {} }; constexpr strt f() { return {}; } constexpr strt HelloWorld =3D f(); const char *a() { return HelloWorld._M_dataplus; } ``` it was rejected before GCC 10 with the following error message: ``` :13:31: error: 'strt{(&.strt::_M_local_buf), '\000'}' is= not a constant expression 13 | constexpr strt HelloWorld =3D f(); | ^ ``` Maybe that will give an hint where the issue is ...=