From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8885 invoked by alias); 25 Mar 2015 03:46:03 -0000 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 Received: (qmail 8851 invoked by uid 48); 25 Mar 2015 03:45:59 -0000 From: "juergen.reuter at desy dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/65548] New: [5.0 Regression] gfc_conv_procedure_call Date: Wed, 25 Mar 2015 07:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: juergen.reuter at desy dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg02678.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65548 Bug ID: 65548 Summary: [5.0 Regression] gfc_conv_procedure_call Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: juergen.reuter at desy dot de The following code {{{ module selectors type :: selector_t integer, dimension(:), allocatable :: map real, dimension(:), allocatable :: weight contains procedure :: init => selector_init end type selector_t contains subroutine selector_init (selector, weight) class(selector_t), intent(out) :: selector real, dimension(:), intent(in) :: weight real :: s integer :: n, i logical, dimension(:), allocatable :: mask s = sum (weight) allocate (mask (size (weight)), source = weight /= 0) n = count (mask) if (n > 0) then allocate (selector%map (n), & source = pack ([(i, i = 1, size (weight))], mask)) allocate (selector%weight (n), & source = pack (weight / s, mask)) else allocate (selector%map (1), source = 1) allocate (selector%weight (1), source = 0.) end if end subroutine selector_init end module selectors }}} yields an ICE with gfortran 5.0 trunk: $ gfortran -c selectors.f90 selectors.f90:23:0: source = pack ([(i, i = 1, size (weight))], mask)) 1 internal compiler error: in gfc_conv_procedure_call, at fortran/trans-expr.c:5608 selectors.f90:23:0: internal compiler error: Abort trap: 6 gfortran: internal compiler error: Abort trap: 6 (program f951) My gcc version is r221644 from the trunk, a version from ca. March 4th or 5th did still work.