This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/64028] [5 Regression] r211599 caused many vectorizer test failures with -fPIC
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Jan 2015 15:42:53 +0000
- Subject: [Bug middle-end/64028] [5 Regression] r211599 caused many vectorizer test failures with -fPIC
- Auto-submitted: auto-generated
- References: <bug-64028-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64028
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I believe that is correct though.
If you have -fPIC, it means the sa or sb arrays could be interposed, and they
can have a different alignment then, so you can't rely on the increased
alignment.
So, either those tests should use
/* { dg-require-effective-target nonpic } */
or could e.g. use hidden visibility, or make the arrays static.
E.g.
--- gcc.dg/vect/vect-7.c (revision 219190)
+++ gcc.dg/vect/vect-7.c (working copy)
@@ -5,8 +5,8 @@
#define N 128
-short sa[N];
-short sb[N];
+static short sa[N];
+static short sb[N];
__attribute__ ((noinline))
int main1 ()
works fine for me. What other tests behave similarly?