This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/39539] New: wrong function name and line numbers with -g -O2 option
- From: "MR dot Swami dot Reddy at nsc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Mar 2009 09:56:45 -0000
- Subject: [Bug debug/39539] New: wrong function name and line numbers with -g -O2 option
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
With -g -O2 option, crx-elf-gcc generates wrong line numbers and function
names.
==
/tmp/ccrrZsJf.o: In function `090312 (experimental)':
/home10/swami/test.c:5: undefined reference to `_f1'
collect2: ld returned 1 exit status
===
Expected output could be:
===
/tmp/ccEJcFRs.o: In function `main':
/home10/swami/test.c:6: undefined reference to `_f1'
collect2: ld returned 1 exit status
----
testcase: "test.c"
====
int f = 1;
extern int f1 ();
main () {
f1();
}
===
--
Summary: wrong function name and line numbers with -g -O2 option
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: MR dot Swami dot Reddy at nsc dot com
GCC host triplet: Native Linux
GCC target triplet: crx-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39539