From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17865 invoked by alias); 26 Oct 2006 20:29:43 -0000 Received: (qmail 17826 invoked by uid 48); 26 Oct 2006 20:29:31 -0000 Date: Thu, 26 Oct 2006 20:29:00 -0000 Message-ID: <20061026202931.17825.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/29267] different length non-constant strings in array constructors ICE In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tobias dot burnus at physik dot fu-berlin dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg02279.txt.bz2 List-Id: ------- Comment #12 from tobias dot burnus at physik dot fu-berlin dot de 2006-10-26 20:29 ------- > > why is there no problem with this code? > > > > PROGRAM test_constructor > > CHARACTER(len=32), DIMENSION(1,2) :: a > > a = reshape((/ "one arg", "another arg" /), (/ 1, 2 /)) > > END PROGRAM > > Because this doesn't trigger the buggy codepath :-) Sometime in the > past someone went to some lengths to support this kind of invalid > code. Had they read the standard closely, they could have saved > themselves some work. The question is whether one wants to support such code or not? NAG f95 gives an error even with -dusty. sunf95 gives an error. g95 and ifort compile by default, but with -std=f95 / -stand f95 the give an error / warning (respectively). gfortran does not give such warning/error. See also: bug 27998 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29267