From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E6FF03858C66; Fri, 1 Mar 2024 17:02:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6FF03858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709312563; bh=Ynf3cvGLIPFQR+iolZFWnZwjEwEkrPHkQ18S7ytBR/I=; h=From:To:Subject:Date:From; b=qEQ9Tur4t2pyO1rdJhJuYYvbDIU/E3rtg5lq4HrcB5z07fGs4vsAq7AgBB9WqHTMi wvBRfZdbSotYFjVaYuBHMI+6XGzfiF7QAEL5IfjDUDP5JhoTp22lvrbY4tfzYWbdyd C+kNT+1/481k0G1Du0ixP1pzhJ8cUjM1MpHoiO5Q= From: "camel-cdr at protonmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114194] New: ICE when using std::unique_ptr with xtheadvector Date: Fri, 01 Mar 2024 17:02:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: camel-cdr at protonmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D114194 Bug ID: 114194 Summary: ICE when using std::unique_ptr with xtheadvector Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: camel-cdr at protonmail dot com Target Milestone: --- Using std::unique_ptr with xtheadvector enabled causes an ICE: #include extern void use(std::unique_ptr &x); void test(size_t n) { std::unique_ptr x; use(x); } See also: https://godbolt.org/z/6nbhxKdfd I've managed to reduce the problem to the following set of templates, but I have no idea how this could cause the ICE. struct S1 { int x; }; struct S2 { constexpr S2() { } template S2(T&); }; struct S3 : S1, S2 { constexpr S3() : S1() { } S3(S3&); }; void f(S3 &) { S3 x; f(x); } See also: https://godbolt.org/z/5YxM6jd3s It's extremely brittle, the ICE goes away, if you remove constexpr, the reference, or any other part I could think of.=