From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0830F3947427; Tue, 2 May 2023 20:26:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0830F3947427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683059202; bh=AmidPBqK0KriWC9IvXpiw6X002hjEYJeQJmYGJ4ijUQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=A3kZVP9F1ENhJUVsAxVnWpgNGdJTXgXrIEeh2d8afr8wQsEnpsknjqrG2wE3PZhC4 cxuKkmFgRGTVhTUSnbqj4XAomLMdGtPx/zpgRk2G6ZiHhJxK7kq+27XBV/OWVriEMo OciWuT24NiRkiEKKePQ9TSLuiSUXXNEUvTMQ/US0= 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: Tue, 02 May 2023 20:26:41 +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: ASSIGNED X-Bugzilla-Resolution: 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 #4 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:4b8d0d4d7fd245ef85c7801e7838845502a5a61d commit r14-409-g4b8d0d4d7fd245ef85c7801e7838845502a5a61d 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.=