This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/35540] Segmentation fault with __builtin_parity() and -O1
- From: "r dot schuerer at gmx dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Mar 2008 15:23:45 -0000
- Subject: [Bug c/35540] Segmentation fault with __builtin_parity() and -O1
- References: <bug-35540-15896@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from r dot schuerer at gmx dot at 2008-03-11 15:23 -------
The assembler code for f() (as listed by "objdump -d a.out") is as follows:
0804838c <f>:
804838c: 55 push %ebp
804838d: 89 e5 mov %esp,%ebp
804838f: b8 01 00 00 00 mov $0x1,%eax
8048394: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
8048398: 75 12 jne 80483ac <f+0x20>
804839a: 8b 45 08 mov 0x8(%ebp),%eax
804839d: 0f b7 40 02 movzwl 0x2(%eax),%eax
80483a1: 66 33 00 xor (%eax),%ax
80483a4: 30 e0 xor %ah,%al
80483a6: 0f 9b c0 setnp %al
80483a9: 0f b6 c0 movzbl %al,%eax
80483ac: 5d pop %ebp
80483ad: c3 ret
GDB says that:
Program received signal SIGSEGV, Segmentation fault.
0x080483a1 in f ()
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35540