lto: Remove random_seed from section name.
[official-gcc.git] / gcc / testsuite / gfortran.dg / execute_command_line_3.f90
blob7db17c2529109f44d7e5e0d1cb0f9feefb6cb0c6
1 ! { dg-do run }
2 ! PR 82233 - there were program aborts for some of these commands.
3 ! Original test case by Urban Jost.
4 program boom
5 implicit none
6 integer :: i,j
7 character(len=256) :: msg
8 character(len=:), allocatable :: command
9 command='notthere'
10 msg='' ! seems to only be defined if exitstatus.ne.0
11 ! ok -- these work
12 call execute_command_line(command , wait=.false., exitstat=i, cmdstat=j, cmdmsg=msg)
13 if (j /= 0 .or. msg /= '') STOP 1
14 call execute_command_line(command , exitstat=i, cmdstat=j, cmdmsg=msg )
15 if (j /= 3 .or. msg /= "Invalid command line" ) STOP 2
16 msg = ''
17 call execute_command_line(command , wait=.false., exitstat=i, cmdmsg=msg )
18 if (j /= 3) STOP 3
19 call execute_command_line(command , wait=.false., exitstat=i )
20 if (msg /= '') STOP 4
21 call execute_command_line(command , exitstat=i, cmdstat=j )
23 end program boom