Your message dated Thu, 01 Apr 2010 02:06:58 +0200 with message-id <4BB3E3A2.40308@debian.org> and subject line Re: Bug#576111: gcc-4.4 miscompiles __builtin_expect in -O0 has caused the Debian Bug report #576111, regarding gcc-4.4 miscompiles __builtin_expect in -O0 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 576111: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576111 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gcc-4.4 miscompiles __builtin_expect in -O0
- From: Pierre Habouzit <madcoder@debian.org>
- Date: Thu, 01 Apr 2010 01:38:20 +0200
- Message-id: <20100331233820.28713.25485.reportbug@apollon.madism.org>
Package: gcc-4.4 Version: 4.4.3-4 Severity: grave Since gcc-4.4 version 4.4.3-4 (and yes -5 is still affected), gcc miscompiles __builtin_expect when no optimization is set (at least). Test case: int foo(int t) { if (__builtin_expect(t & 0x100, 0)) return 0; return 1; } Bad assembly: gcc -O0 -S -o /dev/stdout a.c .file "a.c" .text .globl foo .type foo, @function foo: .LFB0: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 movq %rsp, %rbp .cfi_offset 6, -16 .cfi_def_cfa_register 6 movl %edi, -4(%rbp) movl -4(%rbp), %eax cltq andl $256, %eax movzbl %al, %eax <--------------------- testq %rax, %rax je .L2 movl $0, %eax jmp .L3 .L2: movl $1, %eax .L3: leave ret .cfi_endproc .LFE0: .size foo, .-foo .ident "GCC: (Debian 4.4.3-5) 4.4.3" .section .note.GNU-stack,"",@progbits The buggy line is marked with the arrow. gcc-4.4 version 4.4.3-3 is correct and doesn't perform the buggy movzbl.
--- End Message ---
--- Begin Message ---
- To: Pierre Habouzit <madcoder@debian.org>, 576111-done@bugs.debian.org
- Subject: Re: Bug#576111: gcc-4.4 miscompiles __builtin_expect in -O0
- From: Matthias Klose <doko@debian.org>
- Date: Thu, 01 Apr 2010 02:06:58 +0200
- Message-id: <4BB3E3A2.40308@debian.org>
- In-reply-to: <20100331233820.28713.25485.reportbug@apollon.madism.org>
- References: <20100331233820.28713.25485.reportbug@apollon.madism.org>
Version: 4.4.3-6I realize that this version is not yet in unstable (uploaded, but ftp-master problems). You may want to recheck with the current version in Ubuntu lucid for now.
--- End Message ---