From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B76883858C00; Fri, 11 Aug 2023 21:23:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B76883858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691788993; bh=TTSB8cMsqkfI+mKDvYEHq9atcKMr8loKWPzG6lpW7tY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uzhwUTG3dXwa3rlhJyB55EmHsHqAAoWO6eeu1Xtv876fILjx5cE+8HaeqFZyP2Tyh VqHOzCmf5ylM9JWYNDra9LQcRlvJ5nfcoa+3BQ3heOYu38QpoeIN3GG7G6aEbRPinY EBYrjURvMydxPg1FzxIjU1yAD06pJ11HiRrTMm3A= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109678] [13/14 Regression] exponential time behavior on std::variant Date: Fri, 11 Aug 2023 21:23:12 +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.0 X-Bugzilla-Keywords: compile-time-hog, memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason 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=3D109678 --- Comment #10 from CVS Commits --- The releases/gcc-13 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:d3088f0ed25fe7200fd657b70cb5af53139b0193 commit r13-7713-gd3088f0ed25fe7200fd657b70cb5af53139b0193 Author: Jason Merrill Date: Mon May 1 17:41:44 2023 -0400 c++: std::variant slow to compile [PR109678] Here, when dealing with a class with a complex subobject structure, we would try and fail to find the relevant FIELD_DECL for an empty base before giving up. And we would do this at each level, in a combinatorially problemat= ic way. Instead, we should check for an empty base first. PR c++/109678 gcc/cp/ChangeLog: * constexpr.cc (cxx_fold_indirect_ref_1): Handle empty base fir= st. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/variant1.C: New test.=