This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31608] wrong types in character array/scalar binop
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2007 10:17:26 -0000
- Subject: [Bug fortran/31608] wrong types in character array/scalar binop
- References: <bug-31608-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #31 from dominiq at lps dot ens dot fr 2007-10-11 10:17 -------
Works as advertised without regression so far (PPC Darwin, 32 bit mode close to
complete), but for the codelets in #30.
I wonder if the code in #28 is valid: the line(s)
merge(transfer(string,"x",len(string)), string, .true.)
does not seems to obey:
13.7.75 MERGE (TSOURCE, FSOURCE, MASK)
...
FSOURCE shall be of the same type and type parameters as TSOURCE.
If I am not mistaken transfer(string,"x",len(string)) is an array of characters
of rank one, size len(string), of character(1), while string is a scalar
character(20) (13.7.121 TRANSFER (SOURCE, MOLD [, SIZE]) ... Case (iii): If
SIZE is present, the result is an array of rank one and size SIZE.).
The patched gfortran, Intel, and g95 accept the code and give the same result;
xlf accept the code, but gives some garbage in the first and fourth lines of
the output; Portland Group compiler rejects the code with:
PGF90-S-0074-Illegal number or type of arguments to merge - keyword argument
fsource (pr31608_4.f90: 16)
Should I fill another PR?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31608