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 target/55184] New: Invalid codegen with vectors and casts


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

             Bug #: 55184
           Summary: Invalid codegen with vectors and casts
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mathias@gaunard.com


Created attachment 28600
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28600
Testcase

On x86-64, when 128-bit vectors of long or unsigned long are aliased, an
invalid optimization seems to occur and causes only the first element of the
vector to be modified.

Output is correct when compiled without optimization, but fails with -O1 or
greater. Usage of -fno-strict-aliasing doesn't change anything.

The problem doesn't seem to appear in the 4.4, 4.5 and 4.7 series.
Nevertheless I'd like to know all the cases it affects and whether there is a
workaround.


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