2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_loc_tests_13.f90
blob62bfe0a3caa8be3fe2c3320731b119001e507c72
1 ! { dg-do compile }
3 ! PR fortran/38536
4 ! Consecutive array and substring references rejected as C_LOC argument
6 ! contributed by Scot Breitenfield <brtnfld@hdfgroup.org>
8 USE ISO_C_BINDING
9 TYPE test
10 CHARACTER(LEN=2), DIMENSION(1:2) :: c
11 END TYPE test
12 TYPE(test), TARGET :: chrScalar
13 TYPE(C_PTR) :: f_ptr
15 f_ptr = C_LOC(chrScalar%c(1)(1:1))
16 END