From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3771C385735E; Thu, 8 Jun 2023 09:52:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3771C385735E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686217920; bh=T7Q6KIfCfmcpOzRSWQf4HO10PIBbGEqz1nBE2tgGyZA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=e9e5LMB/gKLCwTiLyEd7cLnTQ1flJkHnbgIW+u78c9oJNR/bxhyKgevuP6CDhd6/0 N4W1Zzok56pCDZt6jxP5brUDVxUh7kLgO7TQDTh9rLm2O+xg5n0SMa+fhpAUsGnkjA ggcQpi5et1egvwoG8csxLO7K2tS87gkiI/cc0f0Q= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110167] excessive compile time when optimizing std::to_array Date: Thu, 08 Jun 2023 09:51:59 +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.1.0 X-Bugzilla-Keywords: compile-time-hog 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: everconfirmed cf_reconfirmed_on keywords bug_status component 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=3D110167 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-06-08 Keywords| |compile-time-hog Status|UNCONFIRMED |NEW Component|libstdc++ |c++ --- Comment #1 from Jonathan Wakely --- Reduced: template struct array { int data[N]; }; template struct seq { }; template array to_array_impl(int (&a)[sizeof...(Idx)], seq) { return {{a[Idx]...}}; } template array to_array(int (&a)[N]) { return to_array_impl(a, seq<__integer_pack(N)...>{}); } int f[262144]; auto g(void) { return to_array(f); }=