https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63891

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|wrong-code                  |
           Priority|P1                          |P4
                 CC|                            |law at redhat dot com

--- Comment #6 from Jeffrey A. Law <law at redhat dot com> ---
AFAICT, this is actually a false positive and mostly points to an inefficiency
in our -O0 32-bit PIC code generation on x86.

The test wants to make sure that _foo doesn't end up in textcoal_nt section,
which is marked with the coalesced section attribute.

The test (reasonably so) just blindly looks for the existence of the magic
section declaration without any regard to what's in it.

In this case we emit PIC setup.  It's not strictly necessary as there aren't
any uses of the PIC register, but since the optimizer isn't on, DCE is not run
and thus the PIC setup remains.

Once we have PIC setup, we have the get_pc_thunk routine which gets put into
that magic section.  Which then triggers the false positive.

For darwin-weakimport-3.c, the right fix is probably to turn on -O1.  Not sure
what the best fix for builtin-self.c is (maybe an xfail), but in both cases
this isn't worthy of a P1 regresion.  I'd peg it more at a P4/P5 level since
the inefficiencies only show up at -O0.

Reply via email to