diff options
author | Tobias Burnus <burnus@net-b.de> | 2006-11-07 14:27:53 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2006-11-07 14:27:53 +0100 |
commit | 775e6c3a7b9301534d2e6ee3bff8178cde910b49 (patch) | |
tree | c63b26fdfe160e12fa7a62ffabe00e56d67e1b2a /gcc/fortran/module.c | |
parent | c927b11c7832ba293da24201305efa7c3dd64cb0 (diff) | |
download | gcc-775e6c3a7b9301534d2e6ee3bff8178cde910b49.zip gcc-775e6c3a7b9301534d2e6ee3bff8178cde910b49.tar.gz gcc-775e6c3a7b9301534d2e6ee3bff8178cde910b49.tar.bz2 |
re PR fortran/29601 (VOLATILE attribute and statement)
fortran/
2006-11-06 Tobias Burnus <burnus@net-b.de>
PR fortran/29601
* symbol.c (check_conflict, gfc_add_volatile): Add volatile support.
* decl.c (match_attr_spec, gfc_match_volatile): Add volatile support.
* gfortran.h (symbol_attribute): Add volatile_ to struct.
* resolve.c (was_declared): Add volatile support.
* trans-decl.c (gfc_finish_var_decl): Add volatile support.
* match.h: Declare gfc_match_volatile.
* parse.c (decode_statement): Recognize volatile.
* modules.c (ab_attribute, attr_bits, mio_symbol_attribute):
Add volatile support.
* dump-parse-tree.c (gfc_show_attr): Add volatile support.
testsuite/
2006-11-06 Tobias Burnus <burnus@net-b.de>
PR fortran/29601
* gfortran.dg/volatile.f90: Add.
* gfortran.dg/volatile2.f90: Add.
* gfortran.dg/volatile3.f90: Add.
* gfortran.dg/volatile4.f90: Add.
* gfortran.dg/volatile5.f90: Add.
* gfortran.dg/volatile6.f90: Add.
* gfortran.dg/volatile7.f90: Add.
From-SVN: r118545
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index f525ab6..77ac0e9 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -1435,7 +1435,7 @@ typedef enum AB_DATA, AB_IN_NAMELIST, AB_IN_COMMON, AB_FUNCTION, AB_SUBROUTINE, AB_SEQUENCE, AB_ELEMENTAL, AB_PURE, AB_RECURSIVE, AB_GENERIC, AB_ALWAYS_EXPLICIT, AB_CRAY_POINTER, - AB_CRAY_POINTEE, AB_THREADPRIVATE, AB_ALLOC_COMP + AB_CRAY_POINTEE, AB_THREADPRIVATE, AB_ALLOC_COMP, AB_VOLATILE } ab_attribute; @@ -1448,6 +1448,7 @@ static const mstring attr_bits[] = minit ("OPTIONAL", AB_OPTIONAL), minit ("POINTER", AB_POINTER), minit ("SAVE", AB_SAVE), + minit ("VOLATILE", AB_VOLATILE), minit ("TARGET", AB_TARGET), minit ("THREADPRIVATE", AB_THREADPRIVATE), minit ("DUMMY", AB_DUMMY), @@ -1518,6 +1519,8 @@ mio_symbol_attribute (symbol_attribute * attr) MIO_NAME(ab_attribute) (AB_POINTER, attr_bits); if (attr->save) MIO_NAME(ab_attribute) (AB_SAVE, attr_bits); + if (attr->volatile_) + MIO_NAME(ab_attribute) (AB_VOLATILE, attr_bits); if (attr->target) MIO_NAME(ab_attribute) (AB_TARGET, attr_bits); if (attr->threadprivate) @@ -1596,6 +1599,9 @@ mio_symbol_attribute (symbol_attribute * attr) case AB_SAVE: attr->save = 1; break; + case AB_VOLATILE: + attr->volatile_ = 1; + break; case AB_TARGET: attr->target = 1; break; |