From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6971 invoked by alias); 12 Oct 2009 09:33:58 -0000 Received: (qmail 6876 invoked by uid 48); 12 Oct 2009 09:33:45 -0000 Date: Mon, 12 Oct 2009 09:33:00 -0000 Message-ID: <20091012093345.6875.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/41044] internal compiler error: in gfc_conv_intrinsic_function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus 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: 2009-10/txt/msg00999.txt.bz2 ------- Comment #8 from burnus at gcc dot gnu dot org 2009-10-12 09:33 ------- > I have further reducd the test code to: > idx=sum(maxloc(index(pfd%n,pfmt)))-1 Even shorter: idx = index(pfd%n,pfmt) - 1 (Or any other one/two operator expression except of function calls; idx needs to be a rank-1 array.) Another issue (or the same?) is that pfd%n is seen as EXPR_VARIABLE and not as EXPR_CONSTANT. The following vaguely related gives a segfault: type t integer :: i end type t type(t), parameter :: a(1) = t(4) real(a(1)%i) :: b end ==27247== Invalid read of size 8 ==27247== at 0x4C3CDD: simplify_const_ref (expr.c:1168) simplify_const_ref (p=) at /home/tob/projects/gcc/gcc/fortran/expr.c:1559 1559 remove_subobject_ref (p, cons); Seemingly, the segfault is in remove_subobject_ref, called by simplify_const_ref (and "cons" being not a valid pointer). case REF_COMPONENT: cons = find_component_ref (p->value.constructor, p->ref); remove_subobject_ref (p, cons); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41044