diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/class_18.f03')
-rw-r--r-- | gcc/testsuite/gfortran.dg/class_18.f03 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/class_18.f03 b/gcc/testsuite/gfortran.dg/class_18.f03 new file mode 100644 index 000000000..576f931f9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_18.f03 @@ -0,0 +1,18 @@ +! { dg-do run } +! +! PR 43207: [OOP] ICE for class pointer => null() initialization +! +! Original test case by Tobias Burnus <burnus@gcc.gnu.org> +! Modified by Janus Weil <janus@gcc.gnu.org> + + implicit none + type :: parent + end type + type(parent), target :: t + class(parent), pointer :: cp => null() + + if (associated(cp)) call abort() + cp => t + if (.not. associated(cp)) call abort() + +end |