[Bug c/48040] New: .pushsection causes bogus debug records when options -O2 -g are used

2011-03-09 Thread rwhitton at bluearc dot com
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.


[Bug c/48040] .pushsection causes bogus debug records when options -O2 -g are used

2011-03-09 Thread rwhitton at bluearc dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48040

--- Comment #1 from rwhitton at bluearc dot com 2011-03-09 09:54:56 UTC ---
Created attachment 23591
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23591
This is the original non preprocessed source code of the test program