Package: gfortran Version: 4:7.1.0-2 Severity: important Dear Maintainer,
When compiling/running the NAS Parallel Benchmark suite (OpenMP implementation, version 3.3.1), I realized that some kernels (for instance SP) generate a segmentation fault when compiled with -O0 -fopenmp : $ gdb ./bin/sp.W.x [...] (gdb) r Starting program: /tmp/NPB3.3.1/NPB3.3-OMP/bin/sp.W.x [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". NAS Parallel Benchmarks (NPB3.3-OMP) - SP Benchmark No input file inputsp.data. Using compiled defaults Size: 36x 36x 36 Iterations: 400 dt: 0.0015000 Number of available threads: 4 [New Thread 0x7fed13d31700 (LWP 28503)] [New Thread 0x7fed13530700 (LWP 28504)] [New Thread 0x7fed12d2f700 (LWP 28505)] Thread 4 "sp.W.x" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fed12d2f700 (LWP 28505)] 0x0000555555557f00 in exact_rhs_._omp_fn.0 () at exact_rhs.f:22 22 !$omp& jm1,jp1,km1,kp1,dtemp) (gdb) bt #0 0x0000555555557f00 in exact_rhs_._omp_fn.0 () at exact_rhs.f:22 #1 0x00007fed14b8c8be in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1 #2 0x00007fed1450a494 in start_thread (arg=0x7fed12d2f700) at pthread_create.c:333 #3 0x00007fed1424eabf in clone () at ../sysdeps/unix/sysv/linux/x86_64/ clone.S:97 The SIGSEGV happens during the first OpenMP parallel loop. The problem does not appears when compiling with -O1 -fopenmp, or with -O0 alone. It does not appear when compiling with gfortran-5. The problem does appear when compiling with gfortran-6 or gfortran-7 with the -O0 -fopenmp compile flags -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (1001, 'testing'), (600, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.12.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE= (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages gfortran depends on: ii cpp 4:7.1.0-2 ii gcc 4:7.1.0-2 ii gfortran-7 7.2.0-3 gfortran recommends no packages. Versions of packages gfortran suggests: pn gfortran-doc <none> pn gfortran-multilib <none> -- no debconf information