* [committed] PR70592 New test gfortran.dg/deferred_character_16.f90
@ 2016-04-09 13:33 Dominique d'Humières
0 siblings, 0 replies; only message in thread
From: Dominique d'Humières @ 2016-04-09 13:33 UTC (permalink / raw)
To: fortran; +Cc: Paul Richard Thomas, gcc-patches
As asked by Paul Richard Thomas on IRC I have committed the following patch to trunk. I’ll commit it to the gcc-5 branch tomorrow.
Dominique
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog (revision 234849)
+++ gcc/testsuite/ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2016-04-09 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR fortran/70592
+ * gfortran.dg/deferred_character_16.f90: New test.
+
2016-04-09 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/70586
Index: gcc/testsuite/gfortran.dg/deferred_character_16.f90
===================================================================
--- gcc/testsuite/gfortran.dg/deferred_character_16.f90 (nonexistent)
+++ gcc/testsuite/gfortran.dg/deferred_character_16.f90 (working copy)
@@ -0,0 +1,19 @@
+! { dg-do run }
+! PR70592 dynamically-allocated character array
+! Contributed by Peter Knowles <KnowlesPJ@Cardiff.ac.uk>
+!
+PROGRAM main
+ character(len=7) :: res
+ CHARACTER(len=:), DIMENSION(:), POINTER :: cp
+ INTEGER :: i
+ ALLOCATE(CHARACTER(len=1) :: cp(1:6))
+ if (SIZE(cp) /= 6 .or. LBOUND(cp,1) /= 1 .or. UBOUND(cp,1) /= 6) call abort()
+ cp(1)='1'
+ cp(2)='2'
+ cp(3)='3'
+ cp(4)='4'
+ cp(5)='5'
+ cp(6)='6'
+ write (res, *) cp
+ if (res /= ' 123456') call abort()
+END PROGRAM main
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-09 13:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-09 13:33 [committed] PR70592 New test gfortran.dg/deferred_character_16.f90 Dominique d'Humières
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).