[Bug fortran/92977] New: ICE in gfc_trans_omp_atomic, at fortran/trans-openmp.c:3526

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Dec 17 18:55:00 GMT 2019


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

            Bug ID: 92977
           Summary: ICE in gfc_trans_omp_atomic, at
                    fortran/trans-openmp.c:3526
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

In addition to pr92899, down to at least gcc-5 :


$ cat z1.f90
program p
   integer :: n = 1
   integer :: a
!$omp atomic write
   a = f(n) - f(n)
contains
   integer function f(x)
      integer, intent(in) :: x
      f = x
   end
end


$ gfortran-10-20191215 -c z1.f90 -O2 -fopenmp
z1.f90:4:0:

    4 | !$omp atomic write
      |
internal compiler error: in gfc_trans_omp_atomic, at
fortran/trans-openmp.c:3526
0x78bcf5 gfc_trans_omp_atomic
        ../../gcc/fortran/trans-openmp.c:3526
0x79b71f gfc_trans_omp_directive(gfc_code*)
        ../../gcc/fortran/trans-openmp.c:5510
0x70b1d7 trans_code
        ../../gcc/fortran/trans.c:2139
0x7424cd gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6801
0x6bc426 translate_all_program_units
        ../../gcc/fortran/parse.c:6302
0x6bc426 gfc_parse_file()
        ../../gcc/fortran/parse.c:6541
0x70742f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210


More information about the Gcc-bugs mailing list