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

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

Follow-up of pr92977, with pragma acc instead of omp :


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


$ gfortran-10-20200126 -c z1.f90 -O2 -fopenacc
z1.f90:4:0:

    4 | !$acc atomic write
      |
internal compiler error: in gfc_trans_omp_atomic, at
fortran/trans-openmp.c:3771
0x7b2fa5 gfc_trans_omp_atomic
        ../../gcc/fortran/trans-openmp.c:3771
0x7c4667 gfc_trans_oacc_directive(gfc_code*)
        ../../gcc/fortran/trans-openmp.c:5742
0x731387 trans_code
        ../../gcc/fortran/trans.c:2158
0x76899d gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6823
0x6e2796 translate_all_program_units
        ../../gcc/fortran/parse.c:6305
0x6e2796 gfc_parse_file()
        ../../gcc/fortran/parse.c:6544
0x72d8ff gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210

Reply via email to