> /usr/local/gcc-3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/cc1plus -fpreprocessed bug.ii -quiet -dumpbase stabs.cc -g -O2 -Wall -Woverloaded-virtual -Wundef -Wpointer-arith -Wwrite-strings -Werror -Winline -version -o stabs.s GNU CPP version 3.1 20010930 (experimental) (cpplib) (i386 Linux/ELF) GNU C++ version 3.1 20010930 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 3.1 20010930 (experimental). Results in a stabs.s containing: .stabs "../include/libcw/debugmalloc.h",132,0,0,.Ltext2 .Ltext2: .stabn 68,0,235,.LM2-main .LM2: movl $4, (%esp) call _Znwj Causing debuggers to think that 'new' was called from debugmalloc.h line 235. This is obviously not the case (see attached bug.ii file). This problem does not occur with -O0 or -O1. bug.ii file: # 234 "../include/libcw/debugmalloc.h" template<typename TYPE> inline TYPE* __libcwd_allocCatcher(TYPE* new_ptr) { return new_ptr; }; # 3 "stabs.cc" int main(void) { __libcwd_allocCatcher(new int); return 0; } Release: All versions Environment: i686-unknown-linux
State-Changed-From-To: open->analyzed State-Changed-Why: This still happens, but with newer compilers I have to explicitly give -gstabs to provoke this.
I think this is related to bug 10003 which was for dwarf-2/3. I think this is generic debugging bug caused by the inliner if that is the case then is a dup of 10003.
*** Bug 5271 has been marked as a duplicate of this bug. ***
I am going to mark this as a dup of 10003 which is the bug against dwarf-2 but the bug is caused by the tree-inliner so they both are the same bug. *** This bug has been marked as a duplicate of 10003 ***
Not a duplicate of 10003. Also not a duplicate of 12319.
Although 10003 wasn't related, this is indeed a duplicate of PR 5271. I wrote a patch to fix 5271 and confirmed that it fixes this one too. *** This bug has been marked as a duplicate of 5271 ***