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

--- Comment #31 from Óscar Fuentes <gcc_bugzilla at axeitado dot com> ---
> Could you replay the compilation of this file?  In the top level directory,
> do
>   rm i686-w64-mingw32/libgcc/crtend.o
>   make all-target-libgcc
> copy the (long) command line, go into the i686-w64-mingw32/libgcc directory
> and execute it after adding -save-temps to it.  You should get a small
> assembly file named crtend.s and I would be interested in its contents.

The compilation emits this warning:

../../../gcc-11.2.0/libgcc/config/i386/cygming-crtend.c:59:1: warning:
constructor priorities from 0 to 100 are reserved for the implementation
[-Wprio-ctor-dtor]
   59 | static void register_frame_ctor (void) __attribute__ ((constructor
(0)));
      | ^~~~~~


Contents of crtend.s:

$ cat crtend.s
        .file   "cygming-crtend.c"
        .text
        .section        .eh_frame,"w"
        .align 4
___FRAME_END__:
        .space 4
        .text
        .def    _register_frame_ctor;   .scl    3;      .type   32;     .endef
_register_frame_ctor:
LFB55:
        .cfi_startproc
        pushl   %ebp
        .cfi_def_cfa_offset 8
        .cfi_offset 5, -8
        movl    %esp, %ebp
        .cfi_def_cfa_register 5
        subl    $8, %esp
        call    ___gcc_register_frame
        leave
        .cfi_restore 5
        .cfi_def_cfa 4, 4
        ret
        .cfi_endproc
LFE55:
        .section        .ctors.65535,"w"
        .align 4
        .long   _register_frame_ctor
        .ident  "GCC: (Rev1, Built by MSYS2 project) 11.2.0"
        .def    ___gcc_register_frame;  .scl    2;      .type   32;     .endef

Reply via email to