[Bug middle-end/64028] [5 Regression] r211599 caused many vectorizer test failures with -fPIC

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 5 15:42:00 GMT 2015


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?



More information about the Gcc-bugs mailing list