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.

Reply via email to