aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2005-10-25 20:43:22 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2005-10-25 20:43:22 +0200
commitb122dc6a9ab39f2bd75fbf712013b89ff5a71af8 (patch)
tree880f2c237699194e84e6f6e4ece0b041f60f2e4e /gcc/fortran/module.c
parent910450c13f863770bb095264d2ad17b47befce48 (diff)
downloadgcc-b122dc6a9ab39f2bd75fbf712013b89ff5a71af8.zip
gcc-b122dc6a9ab39f2bd75fbf712013b89ff5a71af8.tar.gz
gcc-b122dc6a9ab39f2bd75fbf712013b89ff5a71af8.tar.bz2
trans.h (gfc_conv_cray_pointee): Remove.
* trans.h (gfc_conv_cray_pointee): Remove. * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change. * trans-array.c (gfc_conv_array_parameter): Likewise. * trans-decl.c (gfc_conv_cray_pointee): Remove. (gfc_finish_cray_pointee): New function. (gfc_finish_var_decl): Use it. Don't return early for Cray pointees. (gfc_create_module_variable): Revert 2005-10-24 change. * decl.c (cray_pointer_decl): Update comment. * gfortran.texi: Don't mention Cray pointees aren't visible in the debugger. * symbol.c (check_conflict): Add conflict between cray_pointee and in_common resp. in_equivalence. * resolve.c (resolve_equivalence): Revert 2005-10-24 change. testsuite/ * gfortran.dg/cray_pointers_4.f90: New test. * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE. (attr_bits): Likewise. (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes. (mio_symbol): For cray_pointee write/read cp_pointer reference. testsuite/ * gfortran.dg/cray_pointers_5.f90: New test. From-SVN: r105891
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 1066e2e..763905b 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -1431,7 +1431,8 @@ typedef enum
AB_POINTER, AB_SAVE, AB_TARGET, AB_DUMMY, AB_RESULT,
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_RECURSIVE, AB_GENERIC, AB_ALWAYS_EXPLICIT, AB_CRAY_POINTER,
+ AB_CRAY_POINTEE
}
ab_attribute;
@@ -1458,6 +1459,8 @@ static const mstring attr_bits[] =
minit ("RECURSIVE", AB_RECURSIVE),
minit ("GENERIC", AB_GENERIC),
minit ("ALWAYS_EXPLICIT", AB_ALWAYS_EXPLICIT),
+ minit ("CRAY_POINTER", AB_CRAY_POINTER),
+ minit ("CRAY_POINTEE", AB_CRAY_POINTEE),
minit (NULL, -1)
};
@@ -1542,6 +1545,10 @@ mio_symbol_attribute (symbol_attribute * attr)
MIO_NAME(ab_attribute) (AB_RECURSIVE, attr_bits);
if (attr->always_explicit)
MIO_NAME(ab_attribute) (AB_ALWAYS_EXPLICIT, attr_bits);
+ if (attr->cray_pointer)
+ MIO_NAME(ab_attribute) (AB_CRAY_POINTER, attr_bits);
+ if (attr->cray_pointee)
+ MIO_NAME(ab_attribute) (AB_CRAY_POINTEE, attr_bits);
mio_rparen ();
@@ -1622,6 +1629,12 @@ mio_symbol_attribute (symbol_attribute * attr)
case AB_ALWAYS_EXPLICIT:
attr->always_explicit = 1;
break;
+ case AB_CRAY_POINTER:
+ attr->cray_pointer = 1;
+ break;
+ case AB_CRAY_POINTEE:
+ attr->cray_pointee = 1;
+ break;
}
}
}
@@ -2815,6 +2828,9 @@ mio_symbol (gfc_symbol * sym)
mio_symbol_ref (&sym->result);
+ if (sym->attr.cray_pointee)
+ mio_symbol_ref (&sym->cp_pointer);
+
/* Note that components are always saved, even if they are supposed
to be private. Component access is checked during searching. */