From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2393 invoked by alias); 13 Nov 2015 21:57:18 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 2374 invoked by uid 89); 13 Nov 2015 21:57:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 13 Nov 2015 21:57:16 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id tADLvDPT064937 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 13 Nov 2015 13:57:13 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id tADLvDsa064936; Fri, 13 Nov 2015 13:57:13 -0800 (PST) (envelope-from sgk) Date: Fri, 13 Nov 2015 21:57:00 -0000 From: Steve Kargl To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] PR fortran/67803 -- Check CHARACTER array constructor element types Message-ID: <20151113215713.GA6600@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00068.txt.bz2 The attached patch fixes an ICE that occurs in arith.c(gfc_arith_concat) because op1 and op2 have incompatible typespecs. The fix is actually implemented in array.c(gfc_match_array_constructor) where the types of the elements in a constructor are compared to the typespec that was specified in the constructor. See testcase for examples. Built and regression tested on x86_64-*-freebsd. OK to commit? 2015-11-13 Steven G. Kargl PR fortran/67803 * array.c (gfc_match_array_constructor): If array constructor included a CHARACTER typespec, check array elements for compatible type. 2015-11-13 Steven G. Kargl PR fortran/67803 * gfortran.dg/pr67803.f90: New test. -- Steve