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/81143] New test case gcc.target/powerpc/pr79799-2.c fails on powerpc BE


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81143

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2018-02-08
                 CC|                            |bergner at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |bergner at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> ---
This is a test case bug.  The problem is the following code:

#if __ORDER_LITTLE_ENDIAN__
#define ELE 2
#else
#define ELE 1
#endif

vector float
foo (vector float v1, vector float v2)
{
  return vec_insert (vec_extract (v2, ELE), v1, 0);
}

The bug is that __ORDER_LITTLE_ENDIAN__ is always defined, so we pass the wrong
ELE value to vec_extract() call on big endian.  We should be testing
__LITTLE_ENDIAN__ instead.  Changing that fixes the failure.

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