Interference between declared variable and variable with the same name in private interface scope

Hi,

This does not compile with pgf90 :

SUBROUTINE SUGEOMETRY


IMPLICIT NONE

REAL(KIND=8), ALLOCATABLE :: ZVALH(:)

INTERFACE
SUBROUTINE SUVV1
INTEGER(KIND=4), PARAMETER :: JPKS=KIND(ZVALH)
END SUBROUTINE SUVV1
END INTERFACE

ALLOCATE(ZVALH(0:10))

END SUBROUTINE SUGEOMETRY

I admit it is not super nice, but it should work.

$ pgf90 -c sugeometry.F90
NVFORTRAN-F-0553-Invalid type-spec found in ALLOCATE statement (sugeometry.F90: 14)
NVFORTRAN/x86-64 Linux 21.7-0: compilation aborted
$ pgf90 --version

pgf90 (aka nvfortran) 21.7-0 64-bit target on x86-64 Linux -tp zen 
PGI Compilers and Tools
Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.

$ cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.8 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.8"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.8 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.8:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.8
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.8"

Regards,

Philippe

I opened a bug for this, FS#30571. Thanks for the bug report.