coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / newunit_2.f90
blobb0f797a0736ed3ef570586ccde64ee95903bc20f
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
4 ! PR40008 F2008: Add NEWUNIT= for OPEN statement
5 ! Check for rejection with pre-F2008 standard.
7 ! Contributed by Daniel Kraft, d@domob.eu.
9 program main
10 character(len=25) :: str
11 integer(1) :: myunit
13 open (newunit=myunit, file="some_file") ! { dg-error "Fortran 2008" }
14 close (unit=myunit)
15 end program main