From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33561 invoked by alias); 20 Feb 2018 07:51:18 -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 33541 invoked by uid 89); 20 Feb 2018 07:51:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-yb0-f177.google.com Received: from mail-yb0-f177.google.com (HELO mail-yb0-f177.google.com) (209.85.213.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Feb 2018 07:51:16 +0000 Received: by mail-yb0-f177.google.com with SMTP id i13-v6so3657360ybl.9; Mon, 19 Feb 2018 23:51:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mNFhdXK5graUI/xDnRpo0XsQ7gM8mKFRhEQ/XrCcY/g=; b=MEOAm4BNOiFLStDnn4xoTjiJklDJYh0B5pW4gdx+tWaixIo2oaNsx/IUnm1L0TYplh v1PaBK2Et3S/F2l9nsesBGxtK3PKWI0eT39gF5gUxZAMw1a3JLAQrRQ0n0p0tNbn130Q pzpy/Da9c2iSvacU+dwAipypMHOgsus16kPjKNuKfNRViM4KaHZfa7xsTAiuiu3+KORz ESTVVbH7EC2MGyLmf/v2nLZiIRR3favy3LNhi/LTcpV0PfaYWeOkPvllXCldANSlm+Hg ya+YqssC/E3TKcujEW+YkuCaIkG7aS/f6Abh/aLhH24EqegUOQmbUGuU4XpAbCZbUTq2 mlkw== X-Gm-Message-State: APf1xPBS3PqMh7BptjdVV1beFCmpmLnmkhZinoNLDxNioiTRNeF3posg cLkGZaeLkn6FBGQIHhS9YLngQQE5BHprz8sQqdY= X-Google-Smtp-Source: AH8x225ACxbBG+Pb8sJ3XGz3GHq7W1Aaw+XL0D0VlhhkgHZvpdb41Iz5+ZxluSPDngaoStcaQL8dnP1ktohc7Eer0mM= X-Received: by 10.37.234.16 with SMTP id p16mr2017418ybd.422.1519113074821; Mon, 19 Feb 2018 23:51:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.241.4 with HTTP; Mon, 19 Feb 2018 23:51:14 -0800 (PST) In-Reply-To: References: From: Janne Blomqvist Date: Tue, 20 Feb 2018 07:51:00 -0000 Message-ID: Subject: Re: [patch, fortran] Fix character length in constructors To: Thomas Koenig Cc: "fortran@gcc.gnu.org" , gcc-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00140.txt.bz2 On Tue, Feb 20, 2018 at 12:41 AM, Thomas Koenig wrote: > Hello world, > > when putting in a seemingly innocent simplification for PR 56342, > I caused a regression in PR 82823, in PACK. The root cause of > this one turned out to be PR 48890, in which structure > constructors containing characters were not handled correctly > if the lengths did not match. > > The attached patch fixes that. > > Regression-tested. OK for trunk? It's better to use gfc_mpz_get_hwi() instead of mpz_get_si(). mpz_get_si() returns a long, which is a 32-bit type on win64. Otherwise Ok with the spelling fix suggested by Steve. -- Janne Blomqvist