public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/106509] New: executable hangs if -static is included in compile
@ 2022-08-02 19:22 Gary.White at ColoState dot edu
  2022-08-02 19:38 ` [Bug fortran/106509] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gary.White at ColoState dot edu @ 2022-08-02 19:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106509

            Bug ID: 106509
           Summary: executable hangs if -static is included in compile
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Gary.White at ColoState dot edu
  Target Milestone: ---

Created attachment 53398
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53398&action=edit
gfortran code to reproduce this bug

When the attached code is compiled as:

gfortran bug.f90 -fopenmp -o bug.exe -static

the executable hangs even with a STOP message shown.

If -static is removed, the code executes.

Also, if the number of threads specified is equal to the number available, the
code executes with -static .  But the combination of -static and fewer threads
specified than available on the machine causes the code to hang.

This bug only occurs with gfortran 12.1.  The identical code compiled with
gfortran 11 does not hang.

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

* [Bug fortran/106509] executable hangs if -static is included in compile
  2022-08-02 19:22 [Bug fortran/106509] New: executable hangs if -static is included in compile Gary.White at ColoState dot edu
@ 2022-08-02 19:38 ` pinskia at gcc dot gnu.org
  2022-08-02 19:44 ` [Bug libfortran/106509] " Gary.White at ColoState dot edu
  2022-08-02 22:59 ` kargl at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-08-02 19:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106509

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
-static and glibc and pthreads (which openmp uses) has always been problematic.
Why do you want to use -static?

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

* [Bug libfortran/106509] executable hangs if -static is included in compile
  2022-08-02 19:22 [Bug fortran/106509] New: executable hangs if -static is included in compile Gary.White at ColoState dot edu
  2022-08-02 19:38 ` [Bug fortran/106509] " pinskia at gcc dot gnu.org
@ 2022-08-02 19:44 ` Gary.White at ColoState dot edu
  2022-08-02 22:59 ` kargl at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: Gary.White at ColoState dot edu @ 2022-08-02 19:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106509

--- Comment #2 from GARY.WHITE at ColoState dot edu <Gary.White at ColoState dot edu> ---
(In reply to Andrew Pinski from comment #1)
> -static and glibc and pthreads (which openmp uses) has always been
> problematic. Why do you want to use -static?

Because I'm distributing a large code to users that do not have gfortran
available.

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

* [Bug libfortran/106509] executable hangs if -static is included in compile
  2022-08-02 19:22 [Bug fortran/106509] New: executable hangs if -static is included in compile Gary.White at ColoState dot edu
  2022-08-02 19:38 ` [Bug fortran/106509] " pinskia at gcc dot gnu.org
  2022-08-02 19:44 ` [Bug libfortran/106509] " Gary.White at ColoState dot edu
@ 2022-08-02 22:59 ` kargl at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-08-02 22:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106509

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #3 from kargl at gcc dot gnu.org ---
(In reply to GARY.WHITE@ColoState.edu from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > -static and glibc and pthreads (which openmp uses) has always been
> > problematic. Why do you want to use -static?
> 
> Because I'm distributing a large code to users that do not have gfortran
> available.

Does it hang if you use -static-libgfortran?

BTW, works fine on FreeBSD.

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

end of thread, other threads:[~2022-08-02 22:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 19:22 [Bug fortran/106509] New: executable hangs if -static is included in compile Gary.White at ColoState dot edu
2022-08-02 19:38 ` [Bug fortran/106509] " pinskia at gcc dot gnu.org
2022-08-02 19:44 ` [Bug libfortran/106509] " Gary.White at ColoState dot edu
2022-08-02 22:59 ` kargl at gcc dot gnu.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).