From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31238 invoked by alias); 2 Feb 2015 17:49:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 31220 invoked by uid 89); 2 Feb 2015 17:49:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-we0-f171.google.com Received: from mail-we0-f171.google.com (HELO mail-we0-f171.google.com) (74.125.82.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 02 Feb 2015 17:49:15 +0000 Received: by mail-we0-f171.google.com with SMTP id k11so38122796wes.2; Mon, 02 Feb 2015 09:49:12 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.103.102 with SMTP id fv6mr27105205wib.38.1422899352249; Mon, 02 Feb 2015 09:49:12 -0800 (PST) Received: by 10.217.113.133 with HTTP; Mon, 2 Feb 2015 09:49:12 -0800 (PST) In-Reply-To: <20150202165342.D6531105@mailhost.lps.ens.fr> References: <20150202165342.D6531105@mailhost.lps.ens.fr> Date: Mon, 02 Feb 2015 17:49:00 -0000 Message-ID: Subject: Re: [Patch, fortran] PR 64757 - [5 Regression] ICE in fold_convert_loc, at fold-const.c:2353 From: Paul Richard Thomas To: Dominique Dhumieres Cc: gcc-patches , "fortran@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2015-02/txt/msg00071.txt.bz2 Dear Dominique, On transferring from my laptop to my workstation, I find that it segfaults in runtime - both are x86_64/FC21. If I can, I intend to investigate tonight. Thanks for the report. Paul On 2 February 2015 at 17:53, Dominique Dhumieres wrote: > Dear Paul, > > I have tested your patch at https://gcc.gnu.org/ml/fortran/2015-01/txtwnaoa1115V.txt > (the latest version) and I found that the test type_to_class_3.f03 is miscompiled > (FAIL) with -flto -O0 -m64 (this does not happens with -flto -O0 -m32 or with -Ox and > x!=0). > > In addition, while the reduced test > > type :: Test > integer :: i > end type > > type :: TestReference > class(Test), allocatable :: test(:) > end type > > type(TestReference) :: testList > type(test), allocatable :: x(:) > > allocate (testList%test(2), source = [Test(99), Test(199)]) ! Works, of course > print *, size(testList%test) > x = testList%test > print *, x > end > > gives what I expect, i.e., > > 2 > 99 199 > > type :: Test > integer :: i > end type > > type :: TestReference > class(Test), allocatable :: test(:) > end type > > type(TestReference) :: testList > type(test), allocatable :: x(:) > > testList = TestReference([Test(99), Test(199)]) ! Gave: The rank of the element in the > ! structure constructor at (1) does not > ! match that of the component (1/0) > print *, size(testList%test) > x = testList%test > print *, x > end > > gives > > 1 > 99 > > Last problem I see, > > print *, TestReference([Test(99), Test(199)]) > > gives the following ICE > > f951: internal compiler error: Bad IO basetype (7) > > type_to_class_3_red_2.f03:12:0: > > print *, TestReference([Test(99), Test(199)]) > > > Cheers, > > Dominique -- Outside of a dog, a book is a man's best friend. Inside of a dog it's too dark to read. Groucho Marx