]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/45197 ([F2008] Allow IMPURE elemental procedures)
authorDaniel Kraft <d@domob.eu>
Sun, 15 Aug 2010 15:28:10 +0000 (17:28 +0200)
committerDaniel Kraft <domob@gcc.gnu.org>
Sun, 15 Aug 2010 15:28:10 +0000 (17:28 +0200)
commite6c148988cfe585abf4eb2d3f1839f97a83cc1a9
treee3e1c7f09d4ce2dcff79e7b4801680172b017c43
parent69f11a1360a23fd4aa0567ab1c4b62dcc5be8127
re PR fortran/45197 ([F2008] Allow IMPURE elemental procedures)

2010-08-15  Daniel Kraft  <d@domob.eu>

PR fortran/45197
* decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
routines not IMPURE also as PURE.
* intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
`NO_CLASS' in `CLASS_IMPURE'.
(add_sym): Set symbol-attributes `pure' and `elemental' correctly.
(add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
(add_functions): Ditto.
(add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
* resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
(resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
are not ALLOCATABLE and have their INTENT specified.

2010-08-15  Daniel Kraft  <d@domob.eu>

PR fortran/45197
* gfortran.dg/elemental_args_check_3.f90: New test.
* gfortran.dg/impure_1.f08: New test.
* gfortran.dg/impure_2.f08: New test.
* gfortran.dg/impure_3.f90: New test.
* gfortran.dg/typebound_proc_6.f03: Changed expected error message.

From-SVN: r163261
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/intrinsic.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/elemental_args_check_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/impure_1.f08 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/impure_2.f08 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/impure_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/typebound_proc_6.f03