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

            Bug ID: 107865
           Summary: [12/13 Regression] ICE in verify_loop_structure, at
                    cfgloop.cc:1748 (Error: loop 3's number of iterations
                    '_61 > 0 ? (uint128_t) (_61 + -1) : 0' references the
                    released SSA name '_61')
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gfortran 13.0.0 20221120 snapshot (g:a16a5460447eaaff0b4468064e4d7b1cc8fc42eb)
ICEs when compiling the following testcase w/ -O1 -floop-parallelize-all
-ftree-parallelize-loops=2:

      SUBROUTINE FNC (F)

      IMPLICIT REAL (A-H)
      DIMENSION F(N)

      DO I = 1, 6
         DO J = 1, 6
            IF (J .NE. I) THEN
               F(I) = F(I) + 1
            END IF
         END DO
      END DO

      RETURN
      END

% gfortran-13 -O1 -floop-parallelize-all -ftree-parallelize-loops=2 -c
g7tbwxor.f
g7tbwxor.f:1:20:

    1 |       SUBROUTINE FNC (F)
      |                    ^
Error: loop 3's number of iterations '_61 > 0 ? (uint128_t) (_61 + -1) : 0'
references the released SSA name '_61'
during GIMPLE pass: ompexpssa
g7tbwxor.f:1:20: internal compiler error: in verify_loop_structure, at
cfgloop.cc:1748
0x6ac564 verify_loop_structure()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/cfgloop.cc:1748
0x1ea4a0b expand_omp_taskreg
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/omp-expand.cc:1513
0x1ea91d7 expand_omp_synch
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/omp-expand.cc:8653
0x1ea91d7 expand_omp
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/omp-expand.cc:10610
0x1eab175 execute_expand_omp
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221120/work/gcc-13-20221120/gcc/omp-expand.cc:10813

Reply via email to