From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13874 invoked by alias); 23 Apr 2009 14:51:42 -0000 Received: (qmail 13834 invoked by uid 48); 23 Apr 2009 14:51:27 -0000 Date: Thu, 23 Apr 2009 14:51:00 -0000 Message-ID: <20090423145127.13833.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/39865] ICE in gfc_conv_scalarized_array_ref In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub 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-04/txt/msg02146.txt.bz2 ------- Comment #8 from jakub at gcc dot gnu dot org 2009-04-23 14:51 ------- A different testcase that segfaults even a little bit earlier: subroutine test() interface function f() character(len=1) :: f(5) end function f end interface write (*, f()) 1 end subroutine test Here upon entry to gfc_convert_array_to_string e->ref == NULL, so it crashes already in that function. If the array is packed, guess all we want is compute the address of its first element and its SIZEOF (could we use the SIZEOF intrinsic expansion for that)? If it is not packed, I'm afraid we need to pack it and then do what we do for packed arrays. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39865