https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129
Bug ID: 94129 Summary: Using almost any openacc !$acc directive causes ICE "compressed stream: data error" Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: andrew at blamsoft dot com Target Milestone: --- I am using the Ubuntu gcc/gfortran 10 packages with nvptx offloading. Specifically, the packages are gfortran-10 and gcc-10-offload-nvptx. The specific versions are: GNU Fortran (Ubuntu 10-20200304-1ubuntu1) 10.0.1 20200304 (experimental) [master revision 0b0908c1f27:cb0a7e0ca53:94f7d7ec6ebef49a50da777fd71db3d03ee03aa0] gcc (Ubuntu 10-20200304-1ubuntu1) 10.0.1 20200304 (experimental) [master revision 0b0908c1f27:cb0a7e0ca53:94f7d7ec6ebef49a50da777fd71db3d03ee03aa0] When trying to use openacc I get the following ICE. 0x8bc90a lto_uncompression_zlib ../../src-nvptx/gcc/lto-compress.c:393 0x8bc90a lto_end_uncompression(lto_compression_stream*, lto_compression) ../../src-nvptx/gcc/lto-compress.c:415 0x8bac1e lto_get_section_data(lto_file_decl_data*, lto_section_type, char const*, int, unsigned long*, bool) ../../src-nvptx/gcc/lto-section-in.c:166 0x8ac51b lto_input_mode_table(lto_file_decl_data*) ../../src-nvptx/gcc/lto-streamer-in.c:1603 0x5c776d lto_file_finalize ../../src-nvptx/gcc/lto/lto-common.c:2200 0x5c776d lto_create_files_from_ids ../../src-nvptx/gcc/lto/lto-common.c:2237 0x5c776d lto_file_read ../../src-nvptx/gcc/lto/lto-common.c:2292 0x5c776d read_cgraph_and_symbols(unsigned int, char const**) ../../src-nvptx/gcc/lto/lto-common.c:2744 0x5b6466 lto_main() ../../src-nvptx/gcc/lto/lto.c:630 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. mkoffload: fatal error: x86_64-linux-gnu-accel-nvptx-none-gcc-10 returned 1 exit status compilation terminated. lto-wrapper: fatal error: /usr/lib/gcc/x86_64-linux-gnu/10//accel/nvptx-none/mkoffload returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status I have found that using "data" and "host_data" work. Any other directive I try such as "parallel" or "kernels" causes a crash. Here is a tutorial program I found that causes the crash. I could not find any simple program online that didn't crash. program main ! Size of vectors integer :: n = 100000000 ! Input vectors real(8),dimension(:),allocatable :: a real(8),dimension(:),allocatable :: b ! Output vector real(8),dimension(:),allocatable :: c integer :: i real(8) :: sum ! Allocate memory for each vector allocate(a(n)) allocate(b(n)) allocate(c(n)) ! Initialize content of input vectors, vector a[i] = sin(i)^2 vector b[i] = cos(i)^2 do i=1,n a(i) = sin(i*1D0)*sin(i*1D0) b(i) = cos(i*1D0)*cos(i*1D0) enddo ! Sum component wise and save result into vector c !$acc kernels copyin(a(1:n),b(1:n)), copyout(c(1:n)) do i=1,n c(i) = a(i) + b(i) enddo !$acc end kernels ! Sum up vector c and print result divided by n, this should equal 1 within error do i=1,n sum = sum + c(i) enddo sum = sum/n print *, 'final result: ', sum ! Release memory deallocate(a) deallocate(b) deallocate(c) end program Compile with: gfortran -fopenacc program.f90