From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55005 invoked by alias); 10 Jul 2017 13:51:34 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 54985 invoked by uid 89); 10 Jul 2017 13:51:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=tia, dear, transfer X-Spam-User: qpsmtpd, 2 recipients X-HELO: nef2.ens.fr Received: from nef2.ens.fr (HELO nef2.ens.fr) (129.199.96.40) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Jul 2017 13:51:31 +0000 Received: from mailhost.lps.ens.fr (tournesol.lps.ens.fr [129.199.120.1]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id v6ADpSrl030918 ; Mon, 10 Jul 2017 15:51:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mailhost.lps.ens.fr (Postfix) with ESMTP id 30BA614D; Mon, 10 Jul 2017 15:51:28 +0200 (CEST) Received: from mailhost.lps.ens.fr ([127.0.0.1]) by localhost (tournesol.lps.ens.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vquOcpH_gxpn; Mon, 10 Jul 2017 15:51:28 +0200 (CEST) Received: from [192.168.1.11] (log78-1-82-242-47-10.fbx.proxad.net [82.242.47.10]) by mailhost.lps.ens.fr (Postfix) with ESMTPSA id F3C0C13F; Mon, 10 Jul 2017 15:51:27 +0200 (CEST) From: =?utf-8?Q?Dominique_d=27Humi=C3=A8res?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [Patch, fortran] PR34640 - ICE when assigning item of a derived-component to a pointer Message-Id: Date: Mon, 10 Jul 2017 13:51:00 -0000 Cc: Thomas Koenig , gfortran To: "pault at gcc dot gnu.org" X-SW-Source: 2017-07/txt/msg00022.txt.bz2 Dear Paul, The new patch passes all my tests but gfortran.dg/pointer_array_7.f90 with = -m32. The following instrumented test module x use iso_c_binding implicit none type foo complex :: c integer :: i end type foo contains subroutine printit(c, a) complex, pointer, dimension(:) :: c integer :: i integer(kind=3D8) :: a a =3D transfer(c_loc(c(2)),a) print *, a end subroutine printit end module x program main use x use iso_c_binding implicit none type(foo), dimension(5), target :: a integer :: i complex, dimension(:), pointer :: pc integer(kind=3D8) :: s1, s2, s3 a%i =3D 0 do i=3D1,5 a(i)%c =3D cmplx(i**2,i) end do pc =3D> a%c call printit(pc, s3) s1 =3D transfer(c_loc(a(2)%c),s1) print *, s1 ! if (s1 /=3D s3) call abort s2 =3D transfer(c_loc(pc(2)),s2) print *, s2 if (s2 /=3D s3) call abort end program main gives at run time 140734725288716 140734725288716 140734725288716 with -m64, but 3220395052 -6820988759585893332 -6820989146132949972 Program aborted. Backtrace: =E2=80=A6 with -m32. TIA Dominique