This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
debug/3352: extern/inline combination in try/catch causes wrong lineinfo for all symbols in file
- To: gcc-gnats at gcc dot gnu dot org
- Subject: debug/3352: extern/inline combination in try/catch causes wrong lineinfo for all symbols in file
- From: jakacki at cidc dot com dot cn
- Date: 22 Jun 2001 01:38:11 -0000
- Reply-To: jakacki at cidc dot com dot cn
>Number: 3352
>Category: debug
>Synopsis: extern/inline combination in try/catch causes wrong lineinfo for all symbols in file
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 21 18:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Grzegorz Jakacki <jakacki@cidc.com.cn>
>Release: gcc version 2.95.2 19991024 (release) , GNU nm 2.9.1
>Organization:
>Environment:
sparc-sun-solaris2.6
>Description:
When there is extern function call in 'try' and inlined
function is called 'catch', and this construct appears in
the last function definition in the source file, all the
symbols in the file get the lineinfo of the inlined
function.
The bug was also present in nightly x86 GNU/Linux
build on 2001-06-20, gcc-3_0-branch (CodeSourcery).
>How-To-Repeat:
$ gcc -c -g inlined_catch_debuginfo_bug.cc
$ nm -l inlined_catch_debuginfo_bug.o | grep main
000000e0 t Letext /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
00000000 ? __EXCEPTION_TABLE__ /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
00000000 ? __FRAME_BEGIN__ /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
U __cp_pop_exception /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
U __eh_rtime_match /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
U __rtti_user /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
U __start_cp_handler /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
00000000 W __tf9exception /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
U __throw /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
00000008 C __ti9exception
U external__Fv /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
00000000 W inlined__Fv /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
00000000 T main /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
U terminate__Fv /home/jakacki/projects/partition/systemc_release/src/gcc-bug/inlined_catch_debuginfo_bug.cc:11
$ cat inlined_catch_debuginfo_bug.cc
//
// compile with 'gcc -c -g'
// (gcc version 2.95.2 19991024 (release))
//
// and make 'nm -l'; the line number of 'main' is 11 not 15 */
// GNU nm 2.9.1
class exception {
};
inline void inlined() {} /* line 11 */
extern void external();
int main(int argc, char* argv[]) /* line 15 */
{
try
{
external();
}
catch(const exception &x)
{
inlined();
}
}
$
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: