This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
incorrect debug information with -O2 and above options
- From: "M R Swami Reddy" <MR dot Swami dot Reddy at nsc dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 13 Nov 2008 18:00:41 +0530
- Subject: incorrect debug information with -O2 and above options
Hello,
I am using the crx target (ie crx-elf-gcc) compiler. When I compile a simple
testcase with -g, its showing correct debug information. If I compile the
same testcase with "-g -O2" (-O2 or above optimizations), then compiler
generates wrong debug info. Could you please advise on this issue?
=========================================================================
With -g command line option:
---------------------------
> crx-elf-gcc align/1.c -g
/tmp/ccC6aaaa.o: In function `main':
align/1.c:3: undefined reference to `one'
With -g -O2 command line options:
---------------------------------
> crx-elf-gcc align/1.c -g -O2
/CRX12-1.10/crx-elf/bin/ld: Dwarf Error: DW_FORM_strp offset (84)
greater than or equal to .debug_str size (47).
/tmp/cck5aaaa.o: In function `.LSM1': //** ERROR **//
align/1.c:3: undefined reference to `one'
===
Thanks in advance.
Thanks
Swami