From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 250B83858C31; Thu, 28 Mar 2024 10:40:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 250B83858C31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711622416; bh=kl6ty0BMmBLU5pBwfvVzImS5dWsTUOXkgVaEdQAoY9o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=U3aouOYbVZJcuGbB/QInaHt3fpcR5XHya5wLe0Bvl6gk8Pg91k1yGdRMsPGwSE3if TWG9jcW41v8DEBAsCL9FBkHTFoiYQ+VtYGnw4Iejn4ht3CucE1u5CW5K/1BBU4yDC3 0Zz0PaXvWZpd4iokCmrDgXXVJFFshDTcpf9gdX/s= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/111781] Fortran compiler complains about variable bound in array dummy argument Date: Thu, 28 Mar 2024 10:40:14 +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: 12.2.0 X-Bugzilla-Keywords: patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mikael at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111781 --- Comment #11 from GCC Commits --- The master branch has been updated by Mikael Morin : https://gcc.gnu.org/g:7f233feafd657250340be3b3500d2697948ae3ed commit r14-9703-g7f233feafd657250340be3b3500d2697948ae3ed Author: Mikael Morin Date: Wed Mar 27 16:30:42 2024 +0100 fortran: Fix specification expression check in submodules [PR114475] The patch fixing PR111781 made the check of specification expressions m= ore restrictive, disallowing local variables in specification expressions of dummy arguments. PR114475 showed an example where that change regresse= d, disallowing in submodules expressions that had been allowed in the pare= nt module. In submodules indeed, the hierarchy of namespaces inherited fr= om the parent module is not reproduced so the host-association of symbols can't be recognized by checking the nesting of namespaces. This change fixes the problem by allowing in specification expressions all the symbols in a submodule that are inherited from the parent modul= e. PR fortran/111781 PR fortran/114475 gcc/fortran/ChangeLog: * expr.cc (check_restricted): In submodules, allow variables ho= st- associated from the parent module. gcc/testsuite/ChangeLog: * gfortran.dg/spec_expr_10.f90: New test. Co-authored-by: Harald Anlauf =