Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / c_loc_tests_15.f90
blob63f8816379ec8905f161af21b4dffca73c2d07ca
1 ! { dg-do compile }
3 ! PR 44925: [OOP] C_LOC with CLASS pointer
5 ! Contributed by Barron Bichon <barron.bichon@swri.org>
7 use iso_c_binding
9 type :: t
10 end type t
12 type(c_ptr) :: tt_cptr
13 class(t), pointer :: tt_fptr
14 if (associated(tt_fptr)) tt_cptr = c_loc(tt_fptr) ! { dg-error "must not be polymorphic" }
16 end