Bug#181096: gcc-3.2: gcc fails to optimise if (l&2) l|=2 away

2003-02-21 Thread Herbert Xu
On Fri, Feb 21, 2003 at 04:26:04PM +0100, Matthias Klose wrote: > please always include information about the status of the gcc-snapshot > package as well. This is what the snapshot produces .file "b.c" .text .p2align 2,,3 .globl k .type k, @function k:

Bug#181096: gcc-3.2: gcc fails to optimise if (l&2) l|=2 away

2003-02-15 Thread herbert
Package: gcc-3.2 Version: 1:3.2.3-0pre1 Severity: wishlist The following function doesn't get optimised away as a noop: int k(int l) { if (l & 2) l |= 2; return l; } $ gcc-3.2 -O2 -S b.c $ cat b.s .file "b.c" .text .p2align 2,,3 .globl k