From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D7E5A3858D37; Sat, 30 Mar 2024 03:54:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7E5A3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711770880; bh=m4dgwMgWhWNELv3UzofQ71Zt5e7TvNdeP4XpCFWL4Y4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MtdpbCwN1CO68pAXZgFqy2TDnX2f6MuYfyBjQGIA3MGgFUH+6WLwSIPnseCy2rACU 0ac76atSQ6vApf+BBkDR03mYn1Qx/OmblDtNmbYdg/OIt1/lj1ub9fY8ULPaof1jpY UIkCQ6V8UCJUY7ZtG++DjFqugx4yv4DsCGHoHfJ8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/114369] tree-vect-loop.cc uses vec_step which is also an altivec intrinsics breaks build when building with clang Date: Sat, 30 Mar 2024 03:54:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 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=3D114369 --- Comment #7 from GCC Commits --- The releases/gcc-13 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:8046a7e2aeeae80c15d99d55ae04755aedf46a2f commit r13-8512-g8046a7e2aeeae80c15d99d55ae04755aedf46a2f Author: Jakub Jelinek Date: Wed Mar 20 10:34:51 2024 +0100 system.h: rename vec_step to workaround powerpc/clang bug [PR114369] On Sat, Jul 20, 2019 at 05:26:57PM +0100, Richard Sandiford wrote: > Gerald Pfeifer writes: > > I have seen an increasing number of reports of GCC failing to > > build with clang on powerpc (on FreeBSD, though that's probably > > immaterial). > > > > Turns out that clang has vec_step as a reserved word on powerpc > > with AltiVec. > > > > We OTOH use vec_step s as a variable name in gcc/tree-vect-loop.c. > > > > > > The best approach I can see is to rename vec_step. Before I prepare > > a patch: what alternate name/spelling would you prefer? > > Would it work to #define vec_step to vec_step_ or something on affect= ed > hosts, say in system.h? > > I'd prefer that to renmaing since "vec_step" does seem the most natur= al > name for the variable. The equivalent scalar variable is "step" and > other vector values in the surrounding code also use the "vec_" prefi= x. So like this? If/when clang finally fixes https://github.com/llvm/llvm-project/issues/85579 on their side, we can then limit it to clang versions which still have = the bug. I've git grepped for vec_set and appart from altivec.h it is just used = in tree-vect-loop.cc, some Ada files which aren't preprocessed, ChangeLogs, rs6000-vecdefines.h (but that header is only included from altivec.h and vec_step is then redefined to the function-like macro) and in rs6000-overload.def but that file is processed with a generator, not included in C/C++ sour= ces. 2024-03-20 Jakub Jelinek PR bootstrap/114369 * system.h (vec_step): Define to vec_step_ when compiling with clang on PowerPC. (cherry picked from commit 5e64228fe1f7ec536da314246eec968aea0d704d)=