From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27614 invoked by alias); 8 Mar 2010 12:36:31 -0000 Received: (qmail 27523 invoked by uid 48); 8 Mar 2010 12:36:21 -0000 Date: Mon, 08 Mar 2010 12:36:00 -0000 Subject: [Bug fortran/43289] New: Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" 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-03/txt/msg00634.txt.bz2 Fortran 2003 (corrigendum 5, ftp://ftp.nag.co.uk/sc22wg5/N1801-N1850/N1815.pdf) has now: Subclause 12.6 Following constraint C1271, add the following new constraint: C1271a The designator of a variable with the VOLATILE attribute shall not appear in a pure subprogram. "A designator is a name followed by zero or more component selectors, array section selectors, array element selectors, and substring selectors." My understanding is that thus the following program is invalid: pure subroutine foo(a, c, d) integer, volatile, intent(inout) :: a, c ! OK integer, volatile :: b ! OK integer :: d b = 4 ! Invalid LHS as "b" is volatile d = b ! Invalid RHS end subroutine -- Summary: Missed constraint C1271a: Referrencing VOLATILE variable in PURE subprogram Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43289