Summary: | PROTECTED attribute (F2003) is not implemented | ||
---|---|---|---|
Product: | gcc | Reporter: | Francois-Xavier Coudert <fxcoudert> |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | anlauf, eedelman, gcc-bugs, pinskia |
Priority: | P2 | ||
Version: | 4.1.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2006-05-08 08:37:39 | |
Bug Depends on: | |||
Bug Blocks: | 20585 |
Description
Francois-Xavier Coudert
2005-09-21 10:45:34 UTC
[in answer to pinskia, who added the keyword accepts-invalid] Currently, gfortran doesn't accept this code: $ gfortran -std=f2003 a.f90 In file a.f90:2 REAL,PROTECTED :: temp 1 Error: Syntax error in data declaration at (1) In the future, it should accept the PROTECTED attribute at line 2, and issue an error (or warning) at line 12. Removing keyword accordingly. I got this wrong because I thought from comment one it was accepting the attribute already but just ignoring it. A good documentation for PROTECTED, in addition to the standard itself, is http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.xlf101a.doc/xlflr/protected.htm Have removed the rejects-valid keyword. Paul Subject: Bug number PR23994 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00663.html Subject: Bug 23994 Author: burnus Date: Sun Dec 10 19:53:07 2006 New Revision: 119709 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119709 Log: fortran/ 2006-12-10 Tobias Burnus <burnus@net-b.de> PR fortran/23994 * interface.c (compare_actual_formal): PROTECTED is incompatible with intent(out). * symbol.c (check_conflict): Check for PROTECTED conflicts. (gfc_add_protected): New function. (gfc_copy_attr): Copy PROTECTED attribute. * decl.c (match_attr_spec): Add PROTECTED support. (gfc_match_protected): New function. * dump-parse-tree.c (gfc_show_attr): Add PROTECTED support. * gfortran.h (gfc_symbol): Add protected flag. Add gfc_add_protected prototype. * expr.c (gfc_check_pointer_assign): Add PROTECTED support. * module.c (ab_attribute, attr_bits, mio_symbol_attribute, mio_symbol_attribute): Add PROTECTED support. * resolve.c (resolve_equivalence): Add PROTECTED support. * match.c (gfc_match_assignment,)gfc_match_pointer_assignment: Check PROTECTED attribute. * match.h: Add gfc_match_protected prototype. * parse.c (decode_statement): Match PROTECTED statement. * primary.c (match_variable): Add PROTECTED support. testsuite/ 2006-12-10 Tobias Burnus <burnus@net-b.de> PR fortran/23994 * gfortran.dg/protected_1.f90: New test. * gfortran.dg/protected_2.f90: New test. * gfortran.dg/protected_3.f90: New test. * gfortran.dg/protected_4.f90: New test. * gfortran.dg/protected_5.f90: New test. * gfortran.dg/protected_6.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/protected_1.f90 trunk/gcc/testsuite/gfortran.dg/protected_2.f90 trunk/gcc/testsuite/gfortran.dg/protected_3.f90 trunk/gcc/testsuite/gfortran.dg/protected_4.f90 trunk/gcc/testsuite/gfortran.dg/protected_5.f90 trunk/gcc/testsuite/gfortran.dg/protected_6.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/fortran/dump-parse-tree.c trunk/gcc/fortran/expr.c trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/interface.c trunk/gcc/fortran/match.c trunk/gcc/fortran/match.h trunk/gcc/fortran/module.c trunk/gcc/fortran/parse.c trunk/gcc/fortran/primary.c trunk/gcc/fortran/resolve.c trunk/gcc/fortran/symbol.c trunk/gcc/testsuite/ChangeLog Fixed in GCC 4.3 |