From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19216 invoked by alias); 24 Sep 2010 08:06:12 -0000 Received: (qmail 19206 invoked by uid 22791); 24 Sep 2010 08:06:11 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Sep 2010 08:06:06 +0000 From: "domob at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug 45776] (fortran) New: Full implementation of variable definition contexts (and related checks) X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: domob at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 24 Sep 2010 08:06:00 -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 X-SW-Source: 2010-09/txt/msg02677.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45776 Summary: Full implementation of variable definition contexts (and related checks) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: domob@gcc.gnu.org Since http://gcc.gnu.org/ml/fortran/2010-09/msg00397.html, there is a new routine to check definability of variables and pointers in one place (expr.c:gfc_check_vardef_context). This should be called from all places mentioned in the standard as variable definition context (F2008, 16.6.7) and pointer association context (F2008, 16.6.8). The pointer association contexts should already be implemented, but not all variable definition contexts. Missing are the IO related ones (items 5-10 of the list in 16.6.7) and the ones related to co-array locks (items 14 and 15). These should also be implemented. For instance, the following invalid program is accepted: module m implicit none integer, protected :: a character(len=128), protected :: str end module m program main use :: m integer, parameter :: b = 42 character(len=128) :: myStr myStr = '5' read(myStr, *) a read(myStr, *) b write(str, *) 5 end program main Note that the last line (write to internal PROTECTED variable) was also accepted before the definability check rework. -- Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.