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

            Bug ID: 124530
           Summary: internal compiler error: in redirect_jump, at
                    jump.cc:1495 when compiling libbacktrace/mmap.c for
                    VAX
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kalvisd at gmail dot com
  Target Milestone: ---

Created attachment 63940
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63940&action=edit
reduced test case

GCC 15.2.0, when cross-compiling ${GCCSRC}/libbacktrace/mmap.c, dies with an
internal compiler error.

A reduced test case is attached (gcc-vax-internal-error-bbro.i)

The cross compiler was run on NetBSD/amd64, configured as below:

[gcc] $ vax--netbsdelf-gcc -v
Using built-in specs.
COLLECT_GCC=vax--netbsdelf-gcc
COLLECT_LTO_WRAPPER=/gcc/amd64--netbsd/bin/../libexec/gcc/vax--netbsdelf/15.2.0/lto-wrapper
Target: vax--netbsdelf
Configured with: ../gcc-15.2.0/configure --prefix=/gcc/15/../amd64--netbsd
--target=vax--netbsdelf --enable-long-long --enable-threads --with-system-zlib
--without-isl --enable-__cxa_atexit --enable-libstdcxx-time=rt
--enable-libstdcxx-threads --with-diagnostics-color=auto-if-env
--with-default-libstdcxx-abi=new --disable-nls --disable-multilib
--disable-bootstrap --enable-languages=c,c++ --without-headers
--disable-hosted-libstdcxx
--with-sysroot=/nbsd/build/obj.vax/srv/nfs/netbsd-git/src/destdir.vax
--with-mpc=/gcc/15/../amd64--netbsd --with-mpfr=/gcc/15/../amd64--netbsd
--with-gmp=/gcc/15/../amd64--netbsd --with-isl=/gcc/15/../amd64--netbsd
--srcdir=/gcc/15/gcc-15.2.0-amd64--netbsd-vax--netbsdelf/../gcc-15.2.0
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.2.0 (GCC) 

Compile with

vax--netbsdelf-gcc -O -c gcc-vax-internal-error-bbro.i

Messages from GCC:

[gcc] $ vax--netbsdelf-gcc -O -o gcc-vax-internal-error-bbro.o
gcc-vax-internal-error-bbro.i 
during RTL pass: bbro
gcc-vax-internal-error-bbro.i: In function 'backtrace_free':
gcc-vax-internal-error-bbro.i:17:1: internal compiler error: in redirect_jump,
at jump.cc:1495
   17 | }
      | ^
0x17348da internal_error(char const*, ...)
       
/gcc/15/gcc-15.2.0-amd64--netbsd-vax--netbsdelf/../gcc-15.2.0/gcc/diagnostic-global-context.cc:517
0x180c59f fancy_abort(char const*, int, char const*)
       
/gcc/15/gcc-15.2.0-amd64--netbsd-vax--netbsdelf/../gcc-15.2.0/gcc/diagnostic.cc:1749
0x17e7116 redirect_jump(rtx_jump_insn*, rtx_def*, int)
       
/gcc/15/gcc-15.2.0-amd64--netbsd-vax--netbsdelf/../gcc-15.2.0/gcc/jump.cc:1495
0x767cc7 force_nonfallthru_and_redirect(edge_def*, basic_block_def*, rtx_def*)
       
/gcc/15/gcc-15.2.0-amd64--netbsd-vax--netbsdelf/../gcc-15.2.0/gcc/cfgrtl.cc:1528
0x76a7da fixup_reorder_chain
       
/gcc/15/gcc-15.2.0-amd64--netbsd-vax--netbsdelf/../gcc-15.2.0/gcc/cfgrtl.cc:4130
0x76a7da cfg_layout_finalize()
       
/gcc/15/gcc-15.2.0-amd64--netbsd-vax--netbsdelf/../gcc-15.2.0/gcc/cfgrtl.cc:4626
0x14e8fab execute
       
/gcc/15/gcc-15.2.0-amd64--netbsd-vax--netbsdelf/../gcc-15.2.0/gcc/bb-reorder.cc:2684
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

(As background information, GCC 14.3 behaves similarly)

Reply via email to