[Bug c/58283] Incorrect debug info when precompilation is on

2013-09-02 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58283

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2013-09-02
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
I get

/tmp/xtest make
g++-4.8 -gdwarf-2 -g3 -O0 -DPRECOMP `wx-config --cflags` -o precomp1.hpp.gch -c
precomp1.hpp
/bin/sh: wx-config: command not found
g++-4.8 -gdwarf-2 -g3 -O0 -DPRECOMP `wx-config --cflags` -o xtest mainmenu.cpp
/bin/sh: wx-config: command not found
nm -C xtest | grep main
 U __libc_start_main@@GLIBC_2.2.5
00400620 T main
addr2line -e xtest $(nm -C xtest | grep ' main$' | awk '{print $1}')
/tmp/xtest/mainmenu.cpp:3

Same with including pecomp1.hpp from mainmenu.cpp.

(so, what does wx-config --cflags return?)

Note that you are testing GCC 4.8, not 4.7.


[Bug c/58283] Incorrect debug info when precompilation is on

2013-09-02 Thread jengelh at inai dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58283

--- Comment #2 from Jan Engelhardt jengelh at inai dot de ---
Oh, -DPRECOMP `wx-config --cflags` is a remnant and may be removed from the
Makefile. The issue continues to be reproducible. It appears on openSUSE
Factory's gcc 4.8.

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/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.8
--enable-ssp --disable-libssp --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.8 --enable-linux-futex --without-system-libunwind
--with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.8.1 20130806 [gcc-4_8-branch revision 201525] (SUSE Linux)


[Bug c/58283] Incorrect debug info when precompilation is on

2013-09-02 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58283

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
As said, it works for me.  Btw, including a PCH indirectly is not supported:

A precompiled header file can be used only when these conditions apply:

...

@item
A precompiled header can't be used once the first C token is seen.  You
can have preprocessor directives before a precompiled header; you cannot
include a precompiled header from inside another header.


[Bug c/58283] Incorrect debug info when precompilation is on

2013-09-02 Thread jengelh at inai dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58283

--- Comment #4 from Jan Engelhardt jengelh at inai dot de ---
you cannot include a precompiled header from inside another header.

Ok. So, this limitation was properly implemented in gcc 4.7, which simply
skipped over the indirectly-included .gch file as if it did not exist. Safe
thing to do.

In gcc 4.8 however, the indirectly-included .gch *is* used rather than skipped,
which I base upon the observation that compile time goes down significantly for
projects with larger amounts of C++ code and the same indirect-inclusion
scheme.


[Bug c/58283] Incorrect debug info when precompilation is on

2013-09-02 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58283

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 CC|rguenther at suse dot de   |rguenth at gcc dot 
gnu.org

--- Comment #5 from Richard Biener rguenth at gcc dot gnu.org ---
You mean the fix for PR38987?


[Bug c/58283] Incorrect debug info when precompilation is on

2013-09-02 Thread jengelh at inai dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58283

--- Comment #6 from Jan Engelhardt jengelh at inai dot de ---
It seems to be ineffective.