This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]