target/6735: sse V4SF alignment not distributed to structs

wesslen@users.sourceforge.net wesslen@users.sourceforge.net
Mon May 20 05:46:00 GMT 2002


>Number:         6735
>Category:       target
>Synopsis:       sse V4SF alignment not distributed to structs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 20 05:46:06 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Wesslén
>Release:        gcc version 3.1
>Organization:
>Environment:
Cygwin 1.3.9/Windows XP
Reading specs from /usr/local/lib/gcc-lib/i686-pc-cygwin/3.1/specs
Configured with: /usr/src/gcc/gcc-3.1/configure 
Thread model: single
gcc version 3.1
>Description:
Alignment from vectorized types is not distributed to aggregate types.
>How-To-Repeat:
Compile with g++ -march=pentium4

#include <iostream>

typedef int v4sf __attribute__((__mode__(V4SF)));

struct misaligned {
        v4sf a;
};

int main()
{
        std::cout << __alignof__(v4sf) << std::endl; // 16
        std::cout << __alignof__(misaligned) << std::endl; // 8
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list