aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/procedure_lvalue.f90
blob: 915f75e810b4412212d0edd80e922fb7f68158c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! Tests the fix for PR17911, where a USE associated l-value
! would cause an ICE in gfc_conv_variable.
! Test contributed by Tobias Schlueter  <tobi@gcc.gnu.org>
module t
  interface a
     module procedure b
  end interface
contains
  integer function b(x)
    b = x
  end function b
end module t

subroutine r
  use t
  b = 1.       ! { dg-error "is not a variable" }
  y = a(1.)
end subroutine r