Bug#701082: gcc-4.7: gcc generates incorrect code with -O2 compiling libffi example

2013-02-24 Thread Philip Ashmore
This problem doesn't happen on Ubuntu or on a fresh squeeze install. Then I realised I had gcc 4.4, 4.5 and 4.6 installed as well as 4.7 and 4.8. With 4.4, 4.5 and 4.6, gcc -O2 -o ffi-test ffi-test.c works. With 4.7 and 4.8 it segfaults instead of outputting "This is cool!". -- To UNSUBSCRIBE, e

Bug#701082: gcc-4.7: gcc generates incorrect code with -O2 compiling libffi example

2013-02-23 Thread Philip Ashmore
The libffi example works with -O0, -O1 and -O2 on armhf (Raspberry PI). gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --wi

Bug#701082: gcc-4.7: gcc generates incorrect code with -O2 compiling libffi example

2013-02-23 Thread Philip Ashmore
On 23/02/13 09:40, Matthias Klose wrote: Am 23.02.2013 10:24, schrieb Philip Ashmore: I did an apt-get -t experimental install gcc-4.7 gcc-4.8 and updated libffi gcc -O0 -o ffi-test ffi-test.c -lffi ./ffi-test Hello World! This is cool! gcc -O1 -o ffi-test ffi-test.c -lffi ./ffi-test Hello

Bug#701082: gcc-4.7: gcc generates incorrect code with -O2 compiling libffi example

2013-02-23 Thread Matthias Klose
Am 23.02.2013 10:24, schrieb Philip Ashmore: > I did an >apt-get -t experimental install gcc-4.7 gcc-4.8 > and updated libffi > > gcc -O0 -o ffi-test ffi-test.c -lffi > ./ffi-test > Hello World! > This is cool! > > gcc -O1 -o ffi-test ffi-test.c -lffi > ./ffi-test > Hello World! > This is coo

Bug#701082: gcc-4.7: gcc generates incorrect code with -O2 compiling libffi example

2013-02-23 Thread Philip Ashmore
I did an apt-get -t experimental install gcc-4.7 gcc-4.8 and updated libffi gcc -O0 -o ffi-test ffi-test.c -lffi ./ffi-test Hello World! This is cool! gcc -O1 -o ffi-test ffi-test.c -lffi ./ffi-test Hello World! This is cool! gcc -O2 -o ffi-test ffi-test.c -lffi ./ffi-test Hello World! Segme

Bug#701082: gcc-4.7: gcc generates incorrect code with -O2 compiling libffi example

2013-02-22 Thread Matthias Klose
Am 21.02.2013 12:46, schrieb Philip Ashmore: > Also, gcc-4.8 is broken (missing deps) in experimental. I doubt it, just finished a complete test rebuild. Please recheck with 4.7 from experimental, and libffi from experimental. -- To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org wit

Bug#701082: gcc-4.7: gcc generates incorrect code with -O2 compiling libffi example

2013-02-21 Thread Philip Ashmore
Package: gcc-4.7 Version: 4.7.2-5 Severity: normal Dear Maintainer, *** Please consider answering these questions, where appropriate *** * What led up to the situation? I'm using libffi5 * What exactly did you do (or not do) that was effective (or ineffective)? I noticed a problem with