From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119762 invoked by alias); 27 Jul 2017 08:31:44 -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 114654 invoked by uid 89); 27 Jul 2017 08:31:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1574, dear, HTo:U*burnus, H*Ad:U*burnus X-Spam-User: qpsmtpd, 3 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; Thu, 27 Jul 2017 08:31:09 +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 v6R8V6Ln039523 ; Thu, 27 Jul 2017 10:31:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mailhost.lps.ens.fr (Postfix) with ESMTP id 0C0F8149; Thu, 27 Jul 2017 10:31:06 +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 oetvM-huHx-C; Thu, 27 Jul 2017 10:31:05 +0200 (CEST) Received: from [192.168.1.14] (log78-1-82-242-47-10.fbx.proxad.net [82.242.47.10]) by mailhost.lps.ens.fr (Postfix) with ESMTPSA id CF8FF136; Thu, 27 Jul 2017 10:31:05 +0200 (CEST) From: =?utf-8?Q?Dominique_d=27Humi=C3=A8res?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [PATCH gfortran] PR53542 USE-associated variables shows original instead of renamed symbol name Message-Id: <2677032B-DFC0-43F1-9AB8-308AF7A2EEBF@lps.ens.fr> Date: Thu, 27 Jul 2017 08:31:00 -0000 Cc: gfortran , gcc-patches To: burnus@gcc.gnu.org X-SW-Source: 2017-07/txt/msg01774.txt.bz2 Dear all, I am planning to commit the following patch as obvious (once Tobias has don= e the debugging) unless someone objects in the coming days. Cheers, Dominique 2017-07-27 Dominique d'Humieres PR fortran/53542 * expr.c (gfc_check_init_expr): Use the renamed name. 2017-07-27 Dominique d'Humieres PR testsuite/53542 * gfortran.dg/use_30.f90: New test. --- ../_clean/gcc/fortran/expr.c 2017-06-04 21:41:26.000000000 +0200 +++ gcc/fortran/expr.c 2017-06-25 13:07:33.000000000 +0200 @@ -2591,7 +2591,7 @@ gfc_check_init_expr (gfc_expr *e) else gfc_error ("Parameter %qs at %L has not been declared or is " "a variable, which does not reduce to a constant " - "expression", e->symtree->n.sym->name, &e->where); + "expression", e->symtree->name, &e->where); =20 break; =20 --- ../_clean/gcc/testsuite/gfortran.dg/use_30.f90 1970-01-01 01:00:00.0000= 00000 +0100 +++ gcc/testsuite/gfortran.dg/use_30.f90 2017-04-03 15:49:13.000000000 +0200 @@ -0,0 +1,17 @@ +! { dg-do compile } +! +! PR53542 USE-associated variables shows original instead of renamed symbo= l name +! Contributed by Tobias Burnus +! +module select_precision + integer :: dp =3D kind(1.0) +end module select_precision + +module ode_types + use select_precision, only: wp =3D> dp +contains + subroutine ode_derivative(x) + real(wp) :: x ! { dg-error "Parameter .wp. at .1. has not been dec= lared" } + end subroutine ode_derivative +end module ode_types +end