This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]