This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/31610] ICE with transfer, merge in gfc_conv_expr_descriptor



------- Comment #6 from pault at gcc dot gnu dot org  2007-05-29 13:17 -------
(In reply to comment #3)
> Paul, I don't think that's solving the right problem.  The code is legal; the
> inner TRANSFER creates an array of CHARACTER with len=1 and size=20, which
> conforms with a CHARACTER scalar of len=20.

I do not agree.  The standard does not demand that the arguments conform but
that

9.3.96 MERGE (TSOURCE, FSOURCE, MASK) 
Description:  Selects between two values or between corresponding elements in
two arrays, according to the condition specified by a logical mask.  
Class:  Elemental function; Generic  
Arguments:  TSOURCE Must be a scalar or array (of any data type).  
  FSOURCE Must be a scalar or array of the same type and type parameters as
TSOURCE.  
  MASK Must be a logical array.  
Results:  The result type is the same as TSOURCE. The value of MASK determines
whether the result value is taken from TSOURCE (if MASK is true) or FSOURCE (if
MASK is false).

According to 2.4.1.1, the type parameters are KIND and LEN.

I think that the g95 and sun messages are correct.

Paul 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31610


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