From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25254 invoked by alias); 23 Oct 2006 10:02:39 -0000 Received: (qmail 25211 invoked by uid 48); 23 Oct 2006 10:02:30 -0000 Date: Mon, 23 Oct 2006 10:02:00 -0000 Message-ID: <20061023100230.25210.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/29507] INDEX in an array initialization causes ICE 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-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg01954.txt.bz2 List-Id: ------- Comment #3 from pault at gcc dot gnu dot org 2006-10-23 10:02 ------- Created an attachment (id=12479) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12479&action=view) Provisional general fix for the PR This patch fixes the the following: real, parameter :: a(2,2) = reshape ((/1.0, 2.0, 3.0, 4.0/), (/2,2/)) real, parameter :: b(2,2) = sin (a) character(6), parameter :: ch(3) = (/"animal", "person", "mantee"/) character(1), parameter :: ch2(3) = (/"n", "r", "t"/) integer, parameter :: i(3) = index (ch, ch2) print *, a, b print *, ch, i end There are still several things to do: (i) Understand why *e needs to be copied to old and then freed; ideally, *e should be assigned to old and expr assigned to it, at exit; (ii) Add conformance checks; (iii) Check if the branch to the new function is in the correct place - it is certainly the earliest opportunity to identify an elemental intrinsic; and (iv) Check that none of the non-elemental intrinsics are screwed up. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29507