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

            Bug ID: 113061
           Summary: [14 Regression][aarch64] ICE in
                    lra_create_new_reg_with_unique_value, at lra.cc:192
                    since r14-6605-gc0911c6b357ba9
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mjires at suse dot cz
                CC: acoplan at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

Compiling reduced testcase gfortran.dg/PR100911.f90 results in ICE since
r14-6605-gc0911c6b357ba9.


$ cat PR100911.f90
module module_foo
  use iso_c_binding
  contains
  subroutine foo(a) bind(c)
    type(c_ptr)  a(..)
    select rank(a)
    end select
    call bar
  end
end


$ aarch64-linux-gnu-gfortran PR100911.f90 -fno-move-loop-invariants -Oz
during RTL pass: reload
PR100911.f90:9:5:

    9 |   end
      |     ^
internal compiler error: in lra_create_new_reg_with_unique_value, at lra.cc:192
0x1578f06 lra_create_new_reg_with_unique_value(machine_mode, rtx_def*,
reg_class, HARD_REG_SET*, char const*)
        /home/mjires/git/GCC/master/gcc/lra.cc:192
0x15792cd lra_create_new_reg(machine_mode, rtx_def*, reg_class, HARD_REG_SET*,
char const*)
        /home/mjires/git/GCC/master/gcc/lra.cc:235
0x1588e7a get_reload_reg
        /home/mjires/git/GCC/master/gcc/lra-constraints.cc:737
0x1593bf4 curr_insn_transform
        /home/mjires/git/GCC/master/gcc/lra-constraints.cc:4663
0x1596278 lra_constraints(bool)
        /home/mjires/git/GCC/master/gcc/lra-constraints.cc:5414
0x157eb50 lra(_IO_FILE*, int)
        /home/mjires/git/GCC/master/gcc/lra.cc:2442
0x1526e43 do_reload
        /home/mjires/git/GCC/master/gcc/ira.cc:5973
0x15272e0 execute
        /home/mjires/git/GCC/master/gcc/ira.cc:6161
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.


$ aarch64-linux-gnu-gfortran -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gfortran
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/aarch64-linux-gnu/14.0.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=aarch64-linux-gnu
--disable-bootstrap --enable-languages=c,c++,fortran --disable-multilib
--disable-libsanitizer --enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231218 (experimental) (GCC)

Reply via email to