For this version: > gfortran -v Using built-in specs. COLLECT_GCC=/opt/gcc/4.5.0/bin/../snos/bin/gfortran COLLECT_LTO_WRAPPER=/opt/gcc/4.5.0/snos/libexec/gcc/x86_64-suse-linux/4.5.0/lto-wrapper Target: x86_64-suse-linux Configured with: ../xt-gcc-4.5.0/configure --prefix=/opt/gcc/4.5.0/snos --disable-nls --libdir=/opt/gcc/4.5.0/snos/lib --enable-languages=c,c++,fortran --with-gxx-include-dir=/opt/gcc/4.5.0/snos/include/g++ --with-slibdir=/opt/gcc/4.5.0/snos/lib --with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux --with-mpc=/opt/gcc/mpc/0.8.1 --with-mpfr=/opt/gcc/mpfr/2.4.2 --with-gmp=/opt/gcc/gmp/4.3.2 --with-sysroot= Thread model: posix gcc version 4.5.0 20100414 (Cray Inc.) (GCC)
And this compile script: > cat compile.gnu ftn -fopenmp -c mod_init_openmp.f90 ftn -fopenmp -c mod_globals.f90 ftn -fopenmp -c mod_mysubs.f90 ftn -fopenmp -c mod_display_arrays.f90 ftn -fopenmp mod_init_openmp.o mod_globals.o mod_mysubs.o mod_display_arrays.o test_loop1.f90 > ./a.out.gnu Running on 2 threads Iteration = 0 After sub1: Array = pb 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 ...... After sub2: Array = out2 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 68.000 Iteration = 6 Segmentation fault -- Summary: segfault in OMP code with threadprivate and copyin Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: longb at cray dot com GCC build triplet: x86_64-suse-linux GCC host triplet: x86_64-suse-linux GCC target triplet: x86_64-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45430