From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12695 invoked by alias); 17 Apr 2007 12:59:08 -0000 Received: (qmail 12648 invoked by uid 48); 17 Apr 2007 12:58:58 -0000 Date: Tue, 17 Apr 2007 12:59:00 -0000 Subject: [Bug libfortran/31604] New: Segfault at runtime on I/O to preconnected unit with OpenMP X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fxcoudert at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-04/txt/msg01220.txt.bz2 $ cat hello.f90 integer :: tid !$omp parallel private(tid) tid = 0 if (tid .eq. 0) write(*,*) 'hello' !$omp end parallel end $ gfortran -fopenmp hello.f90 -g -static $ ./a.out zsh: segmentation fault ./a.out It appears to be due to the combination of (i) spawning a thread (ii) writing to a preconnected unit (iii) having a statically linked binary If you remove any of these three, it works fine. -- Summary: Segfault at runtime on I/O to preconnected unit with OpenMP Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fxcoudert at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31604