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/51743] [ia64] Many gcc.dg/torture/vshuf*.c tests FAIL with -O2 -mbig-endian


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

--- Comment #5 from Richard Henderson <rth at gcc dot gnu.org> 2012-01-05 00:31:35 UTC ---
(In reply to comment #3)
> These tests just shuffle bytes around, so I was under impression that the
> functionality is isolated from OS. And Hello world executes correctly when
> compiled with -mbig-endian.

Hello world only manipulates pointers and spends 99% of its time in libc.

Shuffling bytes around largely depends on how and what you do with it.

Try the more obvious

  int main() { 
    union { int i; char c[4]; } u;
    u.i = 0x01020304;
    printf("%d\n", u.c[0]);
    return 0;
  }

to convince yourself we aren't actually running in big-endian mode.

(In reply to comment #4)
> Hm, should we then reject this switch on linux?

We could probably remove it entirely and let it be controlled by the
OS config headers and get better code within gcc itself.


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