summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/derived_constructor_comps_4.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/derived_constructor_comps_4.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/derived_constructor_comps_4.f9018
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/derived_constructor_comps_4.f90 b/gcc/testsuite/gfortran.dg/derived_constructor_comps_4.f90
new file mode 100644
index 000000000..e70551838
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/derived_constructor_comps_4.f90
@@ -0,0 +1,18 @@
+! { dg-do run }
+!
+! PR 47789: [F03] Structure constructor of type extending DT with no components
+!
+! Contributed by eddyg_61-bugzilla@yahoo.it
+
+type:: one
+end type
+
+type, extends(one) :: two
+ integer :: a
+end type
+
+type(two) :: wo = two(6)
+
+if (wo%a /= 6) call abort()
+
+end