From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 455 invoked by alias); 29 May 2007 13:17:48 -0000 Received: (qmail 418 invoked by uid 48); 29 May 2007 13:17:37 -0000 Date: Tue, 29 May 2007 13:17:00 -0000 Message-ID: <20070529131737.416.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/31610] ICE with transfer, merge in gfc_conv_expr_descriptor In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg02609.txt.bz2 ------- 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