From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D200D3858286; Thu, 4 Jan 2024 11:46:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D200D3858286 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704368807; bh=kVMD1HJ4luH43l8Mgc8g5f0XmGWLbcu91Q3yyvbvdas=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LaA9CeoB0yv2JRir0rSGMXlFJtiLghYpjKDXjdoiNkBRoRJUDBisfpJt6kxRSdHSi p5JwAIopKJpG7arbMsWLiYuO9eNAja1UmDlOyeXiHKIxv6cYmOu1QROgcGg+qucfoJ Uwlo9xcOsukqyWMS2TdoKVHWLgWneQ5iPes8jlM8= From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/68703] __attribute__((vector_size(N))) template member confusion Date: Thu, 04 Jan 2024 11:46:44 +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: 5.2.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D68703 Richard Sandiford changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #11 from Richard Sandiford --- FWIW, the following adaption of the original testcase still fails on trunk,= but is accepted by Clang: template struct D { using t =3D int __attribute__((vector_size(N * sizeof(int)))); t v; int f1() { return this->v[N-1]; } int f2() { return v[N-1]; } }; int main(int ac, char**) { D<> d =3D { { ac } }; return d.f1() + d.f2(); } Same with a typedef instead of "using". But that's probably just another instance of PR88600/PR58855.=