[Bug fortran/104329] New: [12 Regression] ICE in resolve_omp_atomic, at fortran/openmp.cc:7827 (etc.)

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Feb 1 17:38:04 GMT 2022


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

            Bug ID: 104329
           Summary: [12 Regression] ICE in resolve_omp_atomic, at
                    fortran/openmp.cc:7827 (etc.)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

This is marked as a regression because r5 has an ICE,
r6..r11 gives an error, and r12 gives an ICE again.
It started between 20211128 and 20211205 :


$ cat z1.f90
program p
   character(:), allocatable :: x(:)
   x = ['123']
   !$omp atomic update
   x = (x)
end


$ cat z2.f90
program p
   character(:), allocatable :: x(:)
   x = ['123']
   !$omp atomic update
   x = 'a' // x // 'e'
end


$ cat z3.f90
program p
   character(:), allocatable :: x(:)
   x = ['123']
   !$omp atomic capture
   x = 'a' // x // 'e'
   x = x
end


$ gfortran-12-20220130 -c z1.f90 -fopenmp
f951: internal compiler error: in resolve_omp_atomic, at fortran/openmp.cc:7827
0x7389bc resolve_omp_atomic
        ../../gcc/fortran/openmp.cc:7827
0x76790b gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:12365
0x769407 resolve_codes
        ../../gcc/fortran/resolve.cc:17537
0x7694ce gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:17572
0x7517f4 resolve_all_program_units
        ../../gcc/fortran/parse.cc:6586
0x7517f4 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6842
0x79eecf gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:216


More information about the Gcc-bugs mailing list