This works fine on r108219 of the GOMP-branch, but not anymore. Also works on
the latest update of the branch without '-fopenmp'
gfortran-gomp-new -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gomp-new
--program-suffix=-gomp-new --enable-threads=posix
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.2.0-gomp-20050608-branch 20060202 (experimental) (merged
20060202)
gfortran-gomp-new -g -O0 -fopenmp -fautomatic -o testseg testseg.for
PROGRAM TESTSEG
C
INTEGER LUA, LUB
CHARACTER COD*3
C
LUA = 6
LUB = 5
C
WRITE(LUA,160)
READ(LUB,170) COD
C
160 FORMAT ( /, '$', ' Command : ' )
170 FORMAT ( A3, 19( 1X, A3 ) )
C
END
gdb testseg GNU gdb Red Hat Linux (6.3.0.0-1.63rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".
(gdb) r
Starting program: /home/magnusj/source/fortran/vtl/openmp/testseg
[Thread debugging using libthread_db enabled]
[New Thread -1642137888 (LWP 29061)]
$ Command :
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1642137888 (LWP 29061)]
0x00000004 in ?? ()
(gdb) bt
#0 0x00000004 in ?? ()
#1 0x00be1b00 in *_gfortran_st_write_done (dtp=0xbff2605c)
at ../../../gcc/libgfortran/io/transfer.c:2234
#2 0x08048692 in MAIN__ () at testseg.for:9
#3 0x08048737 in main (argc=463360, argv=0x6add60)
at ../../../gcc/libgfortran/fmain.c:18
(gdb) f 1
#1 0x00be1b00 in *_gfortran_st_write_done (dtp=0xbff2605c)
at ../../../gcc/libgfortran/io/transfer.c:2234
2234 unlock_unit (dtp->u.p.current_unit);
--
Summary: Segmentation violation on IA-32 when compiler with -
fopenmp
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgomp
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: magnus_os at yahoo dot se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26104