public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/26069]  New: Runtime endian-ness check is no longer optimized out.
@ 2006-02-02  5:00 atgraham at gmail dot com
  2006-02-02  5:02 ` [Bug rtl-optimization/26069] " atgraham at gmail dot com
                   ` (32 more replies)
  0 siblings, 33 replies; 34+ messages in thread
From: atgraham at gmail dot com @ 2006-02-02  5:00 UTC (permalink / raw)
  To: gcc-bugs

bool tell_endian() {
  unsigned x = 1;
  return *(char*)&x;
}

g++ 3.4.2 produces:

00000000 <_Z11tell_endianv>:
    0:   55                      push   %ebp
    1:   89 e5                   mov    %esp,%ebp
    3:   b8 01 00 00 00          mov    $0x1,%eax
    8:   c9                      leave
    9:   c3                      ret

g++ 4.0.0 produces:

    0:   55                      push   %ebp
    1:   89 e5                   mov    %esp,%ebp
    3:   83 ec 10                sub    $0x10,%esp
    6:   c7 45 fc 01 00 00 00    movl   $0x1,0xfffffffc(%ebp)
    d:   31 c0                   xor    %eax,%eax
    f:   80 7d fc 00             cmpb   $0x0,0xfffffffc(%ebp)
   13:   0f 95 c0                setne  %al
   16:   c9                      leave
   17:   c3                      ret

compile line:
g++ -O3 -c -o endian_test.o endian_test.cpp


-- 
           Summary: Runtime endian-ness check is no longer optimized out.
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: atgraham at gmail dot com
  GCC host triplet: linux-x86-elf
GCC target triplet: linux-x86-elf


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


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2010-04-20 13:05 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-02  5:00 [Bug rtl-optimization/26069] New: Runtime endian-ness check is no longer optimized out atgraham at gmail dot com
2006-02-02  5:02 ` [Bug rtl-optimization/26069] " atgraham at gmail dot com
2006-02-02  5:19 ` [Bug rtl-optimization/26069] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-02-02 14:56 ` rguenth at gcc dot gnu dot org
2006-02-03 11:55 ` rguenth at gcc dot gnu dot org
2006-02-06 10:34 ` rguenth at gcc dot gnu dot org
2006-02-06 16:53 ` gianni at mariani dot ws
2006-02-14  8:59 ` mmitchel at gcc dot gnu dot org
2006-02-24  0:30 ` mmitchel at gcc dot gnu dot org
2006-04-18 16:22 ` bonzini at gnu dot org
2006-05-25  2:39 ` mmitchel at gcc dot gnu dot org
2006-08-26  6:42 ` pinskia at gcc dot gnu dot org
2006-08-26 14:40 ` pinskia at gcc dot gnu dot org
2006-08-26 16:41 ` pinskia at gcc dot gnu dot org
2006-08-26 16:51 ` pinskia at gcc dot gnu dot org
2006-08-26 23:04 ` pinskia at gcc dot gnu dot org
2006-08-26 23:21 ` pinskia at gcc dot gnu dot org
2006-09-05  1:09 ` patchapp at dberlin dot org
2006-12-27  4:35 ` [Bug rtl-optimization/26069] [4.0/4.1/4.2/4.3 " pinskia at gcc dot gnu dot org
2007-02-14  9:11 ` mmitchel at gcc dot gnu dot org
2007-05-27 19:39 ` pinskia at gcc dot gnu dot org
2007-11-03 18:11 ` pinskia at gcc dot gnu dot org
2007-12-03 13:09 ` jakub at gcc dot gnu dot org
2008-02-21 21:55 ` [Bug tree-optimization/26069] [4.0/4.1/4.2/4.3/4.4 " ubizjak at gmail dot com
2008-03-25  3:43 ` [Bug tree-optimization/26069] [4.0/4.1/4.2/4.3 " pinskia at gcc dot gnu dot org
2008-04-30  3:48 ` [Bug tree-optimization/26069] [4.1/4.2/4.3 " pinskia at gcc dot gnu dot org
2008-04-30  3:59 ` pinskia at gcc dot gnu dot org
2008-04-30  4:06 ` pinskia at gcc dot gnu dot org
2008-04-30  4:14 ` pinskia at gcc dot gnu dot org
2008-04-30  9:26 ` pinskia at gcc dot gnu dot org
2008-07-04 20:19 ` [Bug tree-optimization/26069] [4.2/4.3 " jsm28 at gcc dot gnu dot org
2009-03-31 19:10 ` [Bug tree-optimization/26069] [4.3 " jsm28 at gcc dot gnu dot org
2009-08-04 12:35 ` rguenth at gcc dot gnu dot org
2010-04-20 13:05 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).