I couldn't find a report about this test failing but it works at -O2 and lower
and fails at -O3 on IA64 targets.  By inlining foo into main I can make the
test fail at -O2.  Here is a smaller test case, it prints "36, 40, 44, 0" at
-O1 and lower and prints "18, 20, 44, 0" at -O2 and higher.  The -O2 results
are wrong.

typedef float v4sf __attribute__ ((vector_size (16)));
union { v4sf v; float f[4]; } v;
int main (void)
{
  unsigned int i;
  for (i = 0; i < 2; i++)
    v.v += (v4sf) { 18.0, 20.0, 22 };
  printf("%g, %g, %g, %d\n", (double) v.f[0], (double) v.f[1], (double) v.f[2],
(double) v.f[3]);
}


-- 
           Summary: gcc.c-torture/execute/20050604-1.c fails on IA64 at -O3
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sje at cup dot hp dot com
GCC target triplet: ia64-*-*


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

Reply via email to