Bug#472867: more simplier loop (asm x86 corrected)

2008-03-27 Thread Cyprien LAPLACE
Hum, well .. another sample test: /* c.c */ extern void func(void*); void test() { register char (*foo)[32] = (typeof(foo))0-1024; register int index; for(index=0;index<1024;index++) { func(foo++); } } gives, in x86_32: $ gcc-4.3 -c c.c -O3 && objdump -d c.o c.o: f

Bug#472867: more simplier loop (asm x86 corrected)

2008-03-26 Thread Cyprien LAPLACE
/* b.c */ int main() { register long foo = 0; do { asm volatile("nop"::"r"(foo)); } while(++foo); return 0; } which gives with gcc-4.3 -O2 -c b.c: b.o: file format elf64-x86-64 Disassembly of section .text: : 0: 31 c0 xor%eax,%eax 2

Bug#472867: more simplier loop

2008-03-26 Thread Cyprien Laplace
/* b.c */ int main() { register long foo = 0; do { asm volatile("nop"::"r"(foo)); } while(++foo); return 0; } which gives with gcc-4.3 -O2 -c b.c: b.o: file format elf64-x86-64 Disassembly of section .text: : 0: b8 00 00 00 00 mov$0x0,%eax 5:

Bug#472867: gcc-4.3: gcc regression in optimization (4.2 -> 4.3)

2008-03-26 Thread Cyprien LAPLACE
Package: gcc-4.3 Version: 4.3.0-2 Severity: grave Justification: renders package unusable gcc-4.3 forgets some checks in -O2 and -O3, tested on x86_64 and arm (cross-compiler) targets. the following is an exemple code with disassembled generated code by gcc for 4.2 and 4.3 versions: /* a.c */