public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/113313] New: execute_command_line hangs at run time
@ 2024-01-10 20:20 john.harper at vuw dot ac.nz
  2024-01-11  5:49 ` [Bug libfortran/113313] " kargl at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: john.harper at vuw dot ac.nz @ 2024-01-10 20:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113313
           Summary: execute_command_line hangs at run time
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: john.harper at vuw dot ac.nz
  Target Milestone: ---

This program compiles and executes as expected with 3 other compilers (ifort,
ifx, flang). With gfortran 13.1.0 it compiles happily but prints nothing and
hangs at run time. My operating system is ubuntu1~22.04.

program test
! f2008 using execute_command_line and assuming Linux
  implicit none
  print "(A,L2)",'I am john',iam('john')
  print "(A,L2)",'I am JOHN',iam('JOHN')

contains

  logical function iam(      name)
    character(*),intent(in)::name
    integer estat
    character(len(name)+38):: cmd
    cmd = 'if [ `whoami` != "'//name//'" ]; then exit 1; fi'
    call execute_command_line(cmd,exitstat=estat)
    iam = (estat==0)
  end function iam
end program test

The other compilers all printed

I am john T
I am JOHN F

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

end of thread, other threads:[~2024-01-15 20:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-10 20:20 [Bug fortran/113313] New: execute_command_line hangs at run time john.harper at vuw dot ac.nz
2024-01-11  5:49 ` [Bug libfortran/113313] " kargl at gcc dot gnu.org
2024-01-11  7:03 ` john.harper at vuw dot ac.nz
2024-01-11  7:17 ` john.harper at vuw dot ac.nz
2024-01-11 20:18 ` jvdelisle at gcc dot gnu.org
2024-01-11 20:45 ` kargl at gcc dot gnu.org
2024-01-11 22:40 ` john.harper at vuw dot ac.nz
2024-01-12 20:02 ` sgk at troutmask dot apl.washington.edu
2024-01-13  3:42 ` jvdelisle at gcc dot gnu.org
2024-01-15 20:40 ` john.harper at vuw dot ac.nz

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).