re PR fortran/31472 (gfortran does not detect the illegal use of an access specificat...
authorTobias Burnus <burnus@net-b.de>
Thu, 12 Apr 2007 08:46:30 +0000 (10:46 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Thu, 12 Apr 2007 08:46:30 +0000 (10:46 +0200)
commitd51347f96ce3765c6fad1c4e50c2b911e350339f
tree755477f23d921c3c54dc432a7c6885bbc8a94363
parent8c5e065b53c2a1e2ec1351654939891f52a102b4
re PR fortran/31472 (gfortran does not detect the illegal use of an access specification in a program, subroutine, or function)

2007-04-12  Tobias Burnus  <burnus@net-b.de>

PR fortran/31472
* decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
attribute in type definitions.
(gfc_match_private): Allow PRIVATE statement only
in specification part of modules.
(gfc_match_public): Ditto for PUBLIC.
(gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
specificification part of modules.

2007-04-12  Tobias Burnus  <burnus@net-b.de>

PR fortran/31472
* gfortran.dg/access_spec_1.f90: New test.
* gfortran.dg/access_spec_2.f90: New test.
* gfortran.dg/non_module_public.f90: Match new error message.

From-SVN: r123735
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/access_spec_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/access_spec_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/non_module_public.f90