1! { dg-do compile }
2!
3! PR fortran/50163
4!
5! Contributed by Philip Mason
6!
7character(len=2) :: xx ='aa'
8integer :: iloc=index(xx,'bb') ! { dg-error "has not been declared or is a variable" }
9end
10