summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_8.f9017
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90
new file mode 100644
index 000000000..4f7d28895
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_8.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+!
+! PR fortran/51448
+!
+! Contribued by François Willot
+!
+ PROGRAM MAIN
+ IMPLICIT NONE
+ TYPE mytype
+ REAL b(2)
+ END TYPE mytype
+ TYPE(mytype) a
+ DOUBLE PRECISION, ALLOCATABLE :: x(:)
+ ALLOCATE(x(2))
+ a%b=0.0E0
+ x=a%b
+ END