[Bug c++/55468] Label value to incorrect destination

2012-11-25 Thread martin.girard5 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55468



--- Comment #2 from martin.girard5 at gmail dot com 2012-11-26 06:39:35 UTC ---

COLLECT_GCC=g++

COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.7/lto-wrapper

Target: x86_64-suse-linux

Configured with: ../configure --prefix=/usr --infodir=/usr/share/info

--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64

--enable-languages=c,c++,objc,fortran,obj-c++,java,ada

--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.7

--enable-ssp --disable-libssp --disable-libitm --disable-plugin

--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'

--disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib

--enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch

--enable-version-specific-runtime-libs --enable-linker-build-id

--program-suffix=-4.7 --enable-linux-futex --without-system-libunwind

--with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux

Thread model: posix

gcc version 4.7.2 20120920 [gcc-4_7-branch revision 191568] (SUSE Linux) 

COLLECT_GCC_OPTIONS='-o' 'test' '-v' '-save-temps' '-std=c++11' '-I'

'../include' '-march=pentium4' '-mtune=native' '-mfpmath=sse' '-m32'

'-static-libgcc' '-Wno-invalid-offsetof' '-Wno-overflow' '-Wno-pointer-arith'

'-Wno-unused-function' '-Wno-attributes' '-fno-threadsafe-statics'


[Bug c++/55468] Label value to incorrect destination

2012-11-25 Thread martin.girard5 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55468



--- Comment #1 from martin.girard5 at gmail dot com 2012-11-26 06:29:52 UTC ---

Created attachment 28777

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28777

The preprocessed output


[Bug c++/55468] New: Label value to incorrect destination

2012-11-25 Thread martin.girard5 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55468



 Bug #: 55468

   Summary: Label value to incorrect destination

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: martin.gira...@gmail.com





This is a case of a label pointing to the wrong line. It is clear from looking

at the disassembly that the value of said label is bogus.



Look around line 31452. The sigtrap label points to line 31458. Instead, the

&&sigtrap label gives the address of line 31448, four lines above instead of

six lines below.



In the disassembly, one can see a movl instruction writing the address as a

function argument onto the stack, and said address is unmistakably the WSTOPSIG

macro four lines prior. As a result, the executable loops indefinitely upon

reaching this area, whereas it should be skipping the next block instead.