From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A73DB385841F; Mon, 3 Oct 2022 20:24:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A73DB385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664828683; bh=JQSUwlFEeCRuFDnlGDwyI+f/nglkE7QkNP88sjUjBNo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eIxbBJa6RYJm1UyNnudsKOcAbSF1qnn690L6KU/J0TQm05knmoBEAnJfqwEkGa2D7 +CgrRztOwVKZgJI2KXYfx/fTNgVeUWA+JBU+0oe1G8fbihzMNnnkkWPhPRg3ldQWKg BR4e4EKOmoildSjEAoDBTJL+WCvTIDZuj9+WdPwQ= From: "carsten.andrich at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107138] [12 regression] std::variant triggers false-positive 'may be used uninitialized' warning Date: Mon, 03 Oct 2022 20:24:42 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: carsten.andrich at gmx dot de X-Bugzilla-Status: UNCONFIRMED 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=3D107138 --- Comment #2 from carsten.andrich at gmx dot de --- (In reply to Marek Polacek from comment #1) > I see the warning even without -fsanitize=3Dundefined. Yes. Just used -fsanitize=3Dundefined as per the bug writing guidelines. What I forgot to mention though: The issue only occurs with -O2 or higher. = -O1 and -Og compile without the warnings.=