aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/forall_3.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/forall_3.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/forall_3.f9018
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/forall_3.f90 b/gcc/testsuite/gfortran.dg/forall_3.f90
new file mode 100644
index 00000000000..bc5e58c8077
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/forall_3.f90
@@ -0,0 +1,18 @@
+! the problem here was that we had forgot to call
+! fold_convert in gfc_trans_pointer_assign_need_temp
+! so that we got a pointer to char instead of a
+! pointer to an array
+! we really don't need a temp here.
+! { dg-do compile }
+
+ program test_forall
+ type element
+ character(32), pointer :: name
+ end type element
+ type(element) :: charts(50)
+ character(32), target :: names(50)
+ forall(i=1:50)
+ charts(i)%name => names(i)
+ end forall
+ end
+