From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 96A423858C42; Wed, 22 Nov 2023 12:04:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96A423858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700654696; bh=rdg3rU6K++ZlrruDbkjLGGbpXZlxtbcTcgpm0gJ6egQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Si0ls3eRJhSH6zmf9nkkkk7fjVk4FDTkNcRZeLjz2A7z+Kz7XNFuQTFeVHsxK/WTa lXfNYJhUS0dMNbcJvTXBJa8yW2CzunnSHcHW4WFZQHUiDRXS61MmJPYSF2SApxdARJ +4LH4nT0RiDq9uoUO260+3k2P/Nscc4VcyVJDKOE= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112642] ranges::fold_left tries to access inactive union member of string in constant expression Date: Wed, 22 Nov 2023 12:04:56 +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.2.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi 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=3D112642 --- Comment #8 from Jonathan Wakely --- (In reply to Miro Palmu from comment #7) > (In reply to Jonathan Wakely from comment #6) > > The examples in comment 4 do compile using libstdc++ on clang, if you u= se > > libstdc++ headers from after sept 29 (for trunk) or oct 21 (for gcc-13). >=20 > I was testing this on compiler explorer on clang 17.0.1 and it used > gcc-13.2.0 libstdc++. Which is expected to fail, because 13.2.0 was released before Oct 21. > Also tried it locally with clang 16.0.6 with > gcc-13.2.1 libstdc++ Which gcc-13.2.1 though? That's a snapshot that could date from any time in= the past four months. If I use gcc version 13.2.1 20231025 then clang compiles = it. Anyway, the original GCC error is the same as PR 112642 which was apparently reduced to PR 111284, which does seem relevant.=