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

            Bug ID: 99872
           Summary: [11 Regression] optimizations sometimes lead to
                    missing asm prefixes
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jyong at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-w64-mingw32
             Build: x86_64-pc-linux-gnu

Created attachment 50497
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50497&action=edit
lib32_libmingwex_a-pow.c test case

Compiling with the following command line:
x86_64-w64-mingw32-gcc -O2 -c lib32_libmingwex_a-pow.c -std=gnu99 -m32

Causes an undefined symbols with the wrong asm prefixes to be emitted:
00000000 T ___attribute__pow
00000010 B ___attribute__pow_d
00000008 B ___attribute__pow_x
00000000 B ___attribute__pow_y
00000000 b .bss
00000000 d .data
         U ___fpclassify
         U _internal_modf
         U LC5
         U _LC6
00000000 r .rdata
00000000 r .rdata$zzz
         U ___signbit
00000000 t .text

Adding -fno-leading-underscore makes the symbols resolved, 32bit Windows code
is supposed to have a leading underscore.

Reply via email to