------- Comment #1 from burnus at gcc dot gnu dot org 2007-10-12 20:54 ------- > (1) transfer(string,"x",len(string)) is a rank one array of size 7 and should > not be assigned to an array of size 20. I think this is quite difficult to > detect at compile time, but it would be nice to have it at runtime.
NAG f95 agrees with this and prints at run time: Rank 1 of array operand has extent 7 instead of 20 In UPPER, line 9 of test.f90 > (2) merge(tmp, string, .true.) try to merge a rank one character array with a > rank zero string. If this invalid and detected in the first test above, it > should also be detected in the function, unless I am missing something. I think the rank is not a problem as MERGE is an ELEMENTAL function and a scalar ("string") is conformable with any array (such as "tmp"). However, there is the problem that the string length is not the same (1 and 7); NAG f95 prints at run time: Differing character lengths (1 and 7) in MERGE In UPPER, line 10 of test.f90 -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |27766 nThis| | Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC build triplet|powerpc-apple-darwin8 | GCC host triplet|powerpc-apple-darwin8 | GCC target triplet|powerpc-apple-darwin8 | Keywords| |diagnostic Last reconfirmed|0000-00-00 00:00:00 |2007-10-12 20:54:19 date| | Summary|Unequal character lengths in|Unequal character lengths in |MERGE intrinsic not detected|MERGE intrinsic not detected |in contained function. |at run time http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33759