On Linux/x86, revision 162274 gave: FAIL: g++.dg/guality/redeclaration1.C -O2 -flto line 16 i == 24 FAIL: g++.dg/guality/redeclaration1.C -O2 -fwhopr line 16 i == 24 Revision 162258 is OK.
Revision 162269 is bad and revision 162264 is good.
The test is new, how could this be a regression? Yes, -flto/-fwhopr has lots of issues with debug info.
Confirmed.
I can't get anything but { dg-skip-if "" { *-*-* } { "-fwhopr" "-flto" } { "" } } to work. But then -O0 still fails for me. 13 int i = 42;^M $1 = 0^M $2 = 42^M 0 != 42 with gdb 7.1.
This isn't a testsuite bug, but lto/whopr bug, and IMHO quite severe, it affects debugging even at -O0.
Seems to be a bug in free_lang_data_in_block, which throws away the DECL_EXTERNAL decl from BLOCK_VARS, eventhough it is obviously very much needed. In fact, is there ever a case where what free_lang_data_in_block does is desirable?
No. It's gone now ;) But the FAILs remain.
I don't think this is a P1 though, lto is known to have lots of issues with debug info, that isn't going to be fully fixed for 4.6, and this is just one of them.
Author: rguenth Date: Mon Nov 15 15:52:42 2010 New Revision: 166757 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166757 Log: 2010-11-15 Richard Guenther <rguenther@suse.de> PR lto/44989 * g++.dg/guality/redeclaration1.C: Do not execute for LTO. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/guality/redeclaration1.C
Ok, the dg-skip if works. LTO makes us print 24 for the first i. Because gdb name lookup is confused if the local i is gone. So it's really wrong debug info. But it's hardly a regression for LTO. I'll commit the dg-skip and leave the bug open as non-regression.