[Patch, fortran] Bug 68241 - [meta-bug] Deferred-length character - PRs50221, 68216 and 67674
Dominique d'Humières
dominiq@lps.ens.fr
Fri Nov 13 14:16:00 GMT 2015
Dear Paul,
Indeed the abort is due to the fact that I did not update the line
if (size(strings, 1) .ne. 5) call abort
If I do, I dont get any abort. However with the updated patch
--- /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-13 15:10:51.000000000 +0100
@@ -18,9 +18,14 @@ 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"]
+ print *, len(strings), size(strings, 1)
+ print *, strings
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 (size(strings, 1) .ne. 5) call abort
+ if (size(strings, 1) .ne. 4) 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 result of "print *, strings" is
A CDV ?
Dominique
> Le 12 nov. 2015 à 19:56, Dominique d'Humières <dominiq@lps.ens.fr> a écrit :
>
> /opt/gcc/work/gcc/testsuite/gfortran.dg/deferred_character_4.f90
More information about the Fortran
mailing list