This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] Bug 68241 - [meta-bug] Deferred-length character - PRs50221, 68216 and 67674


Paul,

Quick test: your attached tests works with a manual checking. However if I do the following changes in deferred_character_4.f90

--- /opt/gcc/work/gcc/testsuite/gfortran.dg/deferred_character_4.f90	2015-11-12 19:49:04.000000000 +0100
+++ deferred_character_4_db.f90	2015-11-12 19:52:08.000000000 +0100
@@ -18,9 +18,11 @@ program chk_alloc_string
     if (size(strings, 1) .ne. 4) call abort
     if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V"])) call abort
 
-    strings = [character(len=4) :: "A", "C", "ABCDE", "V", "zzzz"]
+!    strings = [character(len=4) :: "A", "C", "ABCDE", "V", "zzzz"]
+    strings = [character(len=4) :: "A", "C", "ABCDE", "V"]
 
     if (len(strings) .ne. 4) call abort
     if (size(strings, 1) .ne. 5) call abort
-    if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V", "zzzz"])) call abort
+!    if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V", "zzzz"])) call abort
+    if (any (strings .ne. [character(len=4) :: "A", "C", "ABCD", "V"])) call abort
 end program chk_alloc_string

the program aborts.

Dominique

> Le 12 nov. 2015 Ã 14:14, Paul Richard Thomas <paul.richard.thomas@gmail.com> a Ãcrit :
> 
> Hi Dominique,
> 
> Are you sure about pr50221 #4? It runs fine for me.
> 
> I have attached the testcases for PRs 50221#4, 63932, and 66408. I
> propose to add these to the commit, once I get approval.....
> 
> I have a further patch for pr49954, which nearly fixes the testcase in
> the PR but is not quite there. However, concatenation is in general
> fixed, when there is no dependency. When there is, the lhs string
> lengt gets updated before the concatenation, thereby shifting the op2
> part of the concatenation. It'll be another few days....
> 
> Cheers
> 
> Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]