From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63554 invoked by alias); 25 Mar 2015 08:50:58 -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 63492 invoked by uid 48); 25 Mar 2015 08:50:50 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/65548] [5 Regression] gfc_conv_procedure_call Date: Wed, 25 Mar 2015 09:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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/msg02700.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65548 Dominique d'Humieres changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pault at gcc dot gnu.org --- Comment #4 from Dominique d'Humieres --- > I'd also appreciate a short workaround. subroutine selector_init (selector, weight) real :: s integer :: n, i logical, dimension(:), allocatable :: mask integer, allocatable :: tmpi(:) real, allocatable :: tmpr(:) s = sum (weight) allocate (mask (size (weight)), source = weight /= 0) n = count (mask) if (n > 0) then allocate(tmpi(n),tmpr(n)) tmpi = pack ([(i, i = 1, size (weight))], mask) tmpr = pack (weight / s, mask) allocate (selector%map (n), source = tmpi) allocate (selector%weight (n), source = tmpr) else allocate (selector%map (1), source = 1) allocate (selector%weight (1), source = 0.) end if end subroutine selector_init