]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/16404 (should reject invalid code with -pedantic -std=f95 ? (x8))
authorPaul Thomas <pault@gcc.gnu.org>
Sat, 1 Oct 2005 07:39:08 +0000 (07:39 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sat, 1 Oct 2005 07:39:08 +0000 (07:39 +0000)
commite8ec07e1ec859fa5e5ff821c7edd350ad6728560
tree4f7afb184987461657573418267617d9f5e4ef27
parent0363db460d75a19d143a437479e2e122743430c7
re PR fortran/16404 (should reject invalid code with -pedantic -std=f95 ? (x8))

2005-10-01  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/16404
PR fortran/20835
PR fortran/20890
PR fortran/20899
PR fortran/20900
PR fortran/20901
PR fortran/20902
* gfortran.h: Prototype for gfc_add_in_equivalence.
* match.c (gfc_match_equivalence): Make a structure component
an explicit,rather than a syntax, error in an equivalence
group.  Call gfc_add_in_equivalence to add the constraints
imposed in check_conflict.
* resolve.c (resolve_symbol): Add constraints: No public
structures with private-type components and no public
procedures with private-type dummy arguments.
(resolve_equivalence_derived): Add constraint that prevents
a structure equivalence member from having a default
initializer.
(sequence_type): New static function to determine whether an
object is default numeric, default character, non-default
or mixed sequence. Add corresponding enum typespec.
(resolve_equivalence): Add constraints to equivalence groups
or their members: No more than one initialized member and
that different types are not equivalenced for std=f95.  All
the simple constraints have been moved to check_conflict.
* symbol.c (check_conflict): Simple equivalence constraints
added, including those removed from resolve_symbol.
(gfc_add_in_equivalence): New function to interface calls
match_equivalence to check_conflict.

2005-10-01  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/16404
PR fortran/20835
PR fortran/20890
PR fortran/20899
PR fortran/20900
PR fortran/20901
PR fortran/20902
gfortran.dg/equiv_constraint_1.f90: New test.
gfortran.dg/equiv_constraint_2.f90: New test.
gfortran.dg/equiv_constraint_3.f90: New test.
gfortran.dg/equiv_constraint_4.f90: New test.
gfortran.dg/equiv_constraint_5.f90: New test.
gfortran.dg/equiv_constraint_6.f90: New test.
gfortran.dg/equiv_constraint_7.f90: New test.
gfortran.dg/equiv_constraint_8.f90: New test.
gfortran.dg/private_type_1.f90: New test.
gfortran.dg/private_type_2.f90: New test.
gfortran.dg/g77/980628-2.f, 980628-3.f, 980628-9.f,
980628-10.f: Assert std=gnu to permit mixing of
types in equivalence statements.

From-SVN: r104850
20 files changed:
gcc/fortran/ChangeLog
gcc/fortran/gfortran.h
gcc/fortran/match.c
gcc/fortran/resolve.c
gcc/fortran/symbol.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/equiv_constraint_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/equiv_constraint_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/equiv_constraint_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/equiv_constraint_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/equiv_constraint_5.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/equiv_constraint_6.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/equiv_constraint_7.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/equiv_constraint_8.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/g77/980628-10.f
gcc/testsuite/gfortran.dg/g77/980628-2.f
gcc/testsuite/gfortran.dg/g77/980628-3.f
gcc/testsuite/gfortran.dg/g77/980628-9.f
gcc/testsuite/gfortran.dg/private_type_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/private_type_2.f90 [new file with mode: 0644]