public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/31604]  New: Segfault at runtime on I/O to preconnected unit with OpenMP
@ 2007-04-17 12:59 fxcoudert at gcc dot gnu dot org
  2007-04-17 13:03 ` [Bug libfortran/31604] Segfault at runtime on I/O with OpenMP and static linking fxcoudert at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-04-17 12:59 UTC (permalink / raw)
  To: gcc-bugs

$ 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-04-18 17:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-17 12:59 [Bug libfortran/31604] New: Segfault at runtime on I/O to preconnected unit with OpenMP fxcoudert at gcc dot gnu dot org
2007-04-17 13:03 ` [Bug libfortran/31604] Segfault at runtime on I/O with OpenMP and static linking fxcoudert at gcc dot gnu dot org
2007-04-17 14:44 ` pinskia at gcc dot gnu dot org
2007-04-17 14:56 ` fxcoudert at gcc dot gnu dot org
2007-04-17 15:00 ` pinskia at gcc dot gnu dot org
2007-04-17 15:05 ` fxcoudert at gcc dot gnu dot org
2007-04-17 15:23 ` pinskia at gcc dot gnu dot org
2007-04-18 10:14 ` dfranke at gcc dot gnu dot org
2007-04-18 17:47 ` fxcoudert at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).