diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/c_loc_tests_15.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/c_loc_tests_15.f90 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_15.f90 b/gcc/testsuite/gfortran.dg/c_loc_tests_15.f90 new file mode 100644 index 000000000..63f881637 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c_loc_tests_15.f90 @@ -0,0 +1,16 @@ +! { dg-do compile } +! +! PR 44925: [OOP] C_LOC with CLASS pointer +! +! Contributed by Barron Bichon <barron.bichon@swri.org> + + use iso_c_binding + + type :: t + end type t + + type(c_ptr) :: tt_cptr + class(t), pointer :: tt_fptr + if (associated(tt_fptr)) tt_cptr = c_loc(tt_fptr) ! { dg-error "must not be polymorphic" } + +end |