2008/1/8, Daniel Franke <franke.daniel@gmail.com>:
Somewhat strange problem: I have a large source file (1.2MB, 32kloc)
that compiles (and works) fine. Compiling the same source, that does
not yet contain any OMP statements, with -fopenmp, it crashes
immediately on runtime.
Some digging showed that this can be easily reproduced:
$> cat sigsegv.f90
real(8), dimension(10000000) :: largearray
largearray = 1.0_8
end
$> gfortran-svn -g -Wall -fdump-tree-original sigsegv.f90 && ./a.out
[ok]
$> gfortran-svn -g -Wall -fopenmp -fdump-tree-original sigsegv.f90
&& /a.out
Segmentation fault
The difference:
$> diff -u sigsegv.f90.003t.original sigsegv.f90.003t.original.openmp
--- sigsegv.f90.003t.original 2008-01-08 18:26:15.000000000 +0100
+++ sigsegv.f90.003t.original.openmp 2008-01-08
18:25:27.000000000 +0100
@@ -1,6 +1,6 @@
MAIN__ ()
{
- static real(kind=8) largearray[10000000];
+ real(kind=8) largearray[10000000];
static integer(kind=4) options.0[7] = {68, 127, 0, 0, 0, 1, 0};