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 target/83496] [7/8 regression] wrong code generated with -Os -mbranch-cost=1


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

--- Comment #24 from Felix Fietkau <nbd at nbd dot name> ---
Created attachment 43498
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43498&action=edit
Test case for internal compiler error (musl source file)´

When I test it with a patched gcc 7.3.x, I get this error on compiling remquo.c
from musl with: -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc
-fno-caller-saves -fno-plt -msoft-float

remquo.c: In function 'remquo':
remquo.c:82:1: internal compiler error: Segmentation fault
 }
 ^
0x9dd06f crash_signal
       
/var/nbd/lede/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/gcc-7.3.0/gcc/toplev.c:337
0x9797f8 fix_reg_dead_note
       
/var/nbd/lede/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/gcc-7.3.0/gcc/reorg.c:1787
0x97e409 relax_delay_slots
       
/var/nbd/lede/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/gcc-7.3.0/gcc/reorg.c:3231
0x97e409 dbr_schedule
       
/var/nbd/lede/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/gcc-7.3.0/gcc/reorg.c:3723
0x97e409 rest_of_handle_delay_slots
       
/var/nbd/lede/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/gcc-7.3.0/gcc/reorg.c:3864
0x97e409 execute
       
/var/nbd/lede/build_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/gcc-7.3.0/gcc/reorg.c:3895

Line 1787 in reorg.c is this piece of code:
    if (REG_NOTE_KIND (link) != REG_DEAD
        || !REG_P (XEXP (link, 0)))
      continue;

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