https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96902
Bug ID: 96902 Summary: internal compiler error in gimplify_scan_omp_clauses with "!$omp target enter data" directive Product: gcc Version: 9.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: michalak at ucar dot edu CC: jakub at gcc dot gnu.org Target Milestone: --- Created attachment 49177 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49177&action=edit Source file that can reproduce the ICE when compiled with gfortran and OpenMP offload > the exact version of GCC; gcc version 10.1.0 (GCC) > the system type; Target: x86_64-pc-linux-gnu Centos7, Intel Xeon (Sandybridge) Thread model: posix Supported LTO compression algorithms: zlib OFFLOAD_TARGET_NAMES=nvptx-none > the options given when GCC was configured/built; Configured with: ../gcc-10.1.0/configure --enable-offload-targets=nvptx-none --with-cuda-driver-include=/opt/nvidia/hpc_sdk/Linux_x86_64/20.7/cuda/11.0/include --with-cuda-driver-lib=/opt/nvidia/hpc_sdk/Linux_x86_64/20.7/cuda/11.0/lib64 --disable-bootstrap --disable-multilib --enable-languages=c,c++,fortran,lto --prefix=/home/michalak/gcc-offload/install > the complete command line that triggers the bug; gfortran -fopenmp -save-temps -c bug1.F90 > the compiler output (error messages, warnings, etc.); % gfortran -fopenmp -save-temps -c bug1.F90 bug1.F90:13:0: 13 | !$omp target enter data map(to:this) | internal compiler error: in gimplify_scan_omp_clauses, at gimplify.c:9013 0xac3ad9 gimplify_scan_omp_clauses ../../gcc-10.1.0/gcc/gimplify.c:9013 0xac787e gimplify_omp_target_update ../../gcc-10.1.0/gcc/gimplify.c:12944 0xac787e gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-10.1.0/gcc/gimplify.c:14147 0xacad26 gimplify_stmt(tree_node**, gimple**) ../../gcc-10.1.0/gcc/gimplify.c:6825 0xacb92f gimplify_bind_expr ../../gcc-10.1.0/gcc/gimplify.c:1424 0xac8a86 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc-10.1.0/gcc/gimplify.c:13809 0xacad26 gimplify_stmt(tree_node**, gimple**) ../../gcc-10.1.0/gcc/gimplify.c:6825 0xacc320 gimplify_body(tree_node*, bool) ../../gcc-10.1.0/gcc/gimplify.c:14857 0xacc825 gimplify_function_tree(tree_node*) ../../gcc-10.1.0/gcc/gimplify.c:15030 0x95d2cf cgraph_node::analyze() ../../gcc-10.1.0/gcc/cgraphunit.c:670 0x960117 analyze_functions ../../gcc-10.1.0/gcc/cgraphunit.c:1227 0x960632 symbol_table::finalize_compilation_unit() ../../gcc-10.1.0/gcc/cgraphunit.c:2974 > the preprocessed file (*.i*) that triggers the bug The compiler does not get far enough to generate a *.i file. I am pasting the file "bug1.F90" below and attaching. Thank you, -John --- Contents of bug1.F90 (also attached): module diffus type diffu_t integer nlap contains procedure :: init end type diffu_t contains module subroutine init ( this ) class(diffu_t), intent(inout) :: this !$omp target enter data map(to:this) end subroutine init end module diffus