coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / generic_5.f90
blobf7a9a9715586b559fea0e973f05b124d9be6ddc2
1 ! { dg-do compile }
2 ! Tests the patch for PR28201, in which the call to ice would cause an ICE
3 ! because resolve.c(resolve_generic_s) would try to look in the parent
4 ! namespace to see if the subroutine was part of a legal generic interface.
5 ! In this case, there is nothing to test, hence the ICE.
7 ! Contributed by Daniel Franke <franke.daniel@gmail.com>
10 MODULE ice_gfortran
11 INTERFACE ice
12 MODULE PROCEDURE ice_i
13 END INTERFACE
15 CONTAINS
16 SUBROUTINE ice_i(i)
17 INTEGER, INTENT(IN) :: i
18 ! do nothing
19 END SUBROUTINE
20 END MODULE
22 MODULE provoke_ice
23 CONTAINS
24 SUBROUTINE provoke
25 USE ice_gfortran
26 CALL ice(23.0) ! { dg-error "no specific subroutine" }
27 END SUBROUTINE
28 END MODULE