From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F9A7388E83D; Wed, 18 Aug 2021 14:07:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F9A7388E83D From: "mhillen at linux dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101876] [s390x] vector builtin vec_permi fails to resolve with #pragma GCC target Date: Wed, 18 Aug 2021 14:07:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mhillen at linux dot ibm.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: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2021 14:07:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101876 --- Comment #2 from Marius Hillenbrand --- Narrowed down what triggers the issue after experimenting with another exam= ple: when the pragma sets 'vx' before the typedef, then the resulting type definition appears broken. when enabling 'vx' only after the typedef, then = the example compiles successfully. updated example: #ifdef BROKEN #pragma GCC target("arch=3Dz13") // note: z13 implies vx #else #pragma GCC target("arch=3Dz13,no-vx") // ... so turn off 'vx' again #endif #include typedef unsigned long long v2di __attribute__((vector_size(16))); #ifndef BROKEN #pragma GCC target("vx") #endif v2di foo(char *ptr) { v2di v =3D *(v2di *)ptr; v =3D vec_permi(v, v, 0); return v; } Compile fails gcc -march=3Dz10 -O3 -DBROKEN -c -S -o- example.c but succeeds without -DBROKEN=