This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48040] New: ".pushsection" causes bogus debug records when options "-O2 -g" are used
- From: "rwhitton at bluearc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 9 Mar 2011 09:53:58 +0000
- Subject: [Bug c/48040] New: ".pushsection" causes bogus debug records when options "-O2 -g" are used
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48040
Summary: ".pushsection" causes bogus debug records when options
"-O2 -g" are used
Product: gcc
Version: 4.4.5
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rwhitton@bluearc.com
Created attachment 23590
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23590
This is the preprocessed test program that demonstrates the problem
Inline assembler that uses .pushsection and .popsection to change the section
being used for code results in bogus debug records which causes a failure at
assembly time if the attached code is compiled with the "-O2 -g" options. The
code
compiles and works correctly with the following options:
-g
-O
-g -O
-O2
it will fail with -O3 but this is just due to the compiler performing inlining
and is to be expected.