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 c/20299] New: Wrong alignment for __m128 variable size array


When I compile the following program with gcc 3.3.5 (debian unstable):

#include <xmmintrin.h>
int main()
{
        int i=1;
        float f;
        __m128 m[i];
        float f2;
        __m128 n[i];
        printf ("%x %x\n", m, n);
}

I get:
% ./align
affff8ec affff8dc

which is wrong, since m and n should be aligned on a 16-byte boundary. If I
declare the arrays with a constant size (instead of i), then the alignment is
right. gcc-3.4.4 works fine. The problem is there regardless of the compile
options I use (e.g. -msse -O2).

-- 
           Summary: Wrong alignment for __m128 variable size array
           Product: gcc
           Version: 3.3.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jean-marc dot valin at usherbrooke dot ca
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20299


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