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: unassig...@gcc.gnu.org ReportedBy: rwhit...@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.