aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/symbol.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2017-10-21 09:02:17 +0000
committerPaul Thomas <pault@gcc.gnu.org>2017-10-21 09:02:17 +0000
commitde624beeae1b049b6bd834b28980e6ce9891d45d (patch)
tree63f51314f4655c12f86d5ba76dd5853289bad244 /gcc/fortran/symbol.c
parentaa93ca090e54442af1f2494ae6f6b07bd3c65630 (diff)
downloadgcc-de624beeae1b049b6bd834b28980e6ce9891d45d.zip
gcc-de624beeae1b049b6bd834b28980e6ce9891d45d.tar.gz
gcc-de624beeae1b049b6bd834b28980e6ce9891d45d.tar.bz2
re PR fortran/82586 ([PDT] ICE: write_symbol(): bad module symbol)
2017-10-21 Paul Thomas <pault@gcc.gnu.org> PR fortran/82586 * decl.c (gfc_get_pdt_instance): Remove the error message that the parameter does not have a corresponding component since this is now taken care of when the derived type is resolved. Go straight to error return instead. (gfc_match_formal_arglist): Make the PDT relevant errors immediate so that parsing of the derived type can continue. (gfc_match_derived_decl): Do not check the match status on return from gfc_match_formal_arglist for the same reason. * resolve.c (resolve_fl_derived0): Check that each type parameter has a corresponding component. PR fortran/82587 * resolve.c (resolve_generic_f): Check that the derived type can be used before resolving the struture constructor. PR fortran/82589 * symbol.c (check_conflict): Add the conflicts involving PDT KIND and LEN attributes. 2017-10-21 Paul Thomas <pault@gcc.gnu.org> PR fortran/82586 * gfortran.dg/pdt_16.f03 : New test. * gfortran.dg/pdt_4.f03 : Catch the changed messages. * gfortran.dg/pdt_8.f03 : Ditto. PR fortran/82587 * gfortran.dg/pdt_17.f03 : New test. PR fortran/82589 * gfortran.dg/pdt_18.f03 : New test. From-SVN: r253970
Diffstat (limited to 'gcc/fortran/symbol.c')
-rw-r--r--gcc/fortran/symbol.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 36abba5..11b6f60 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -426,7 +426,8 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
*is_bind_c = "BIND(C)", *procedure = "PROCEDURE",
*proc_pointer = "PROCEDURE POINTER", *abstract = "ABSTRACT",
*asynchronous = "ASYNCHRONOUS", *codimension = "CODIMENSION",
- *contiguous = "CONTIGUOUS", *generic = "GENERIC", *automatic = "AUTOMATIC";
+ *contiguous = "CONTIGUOUS", *generic = "GENERIC", *automatic = "AUTOMATIC",
+ *pdt_len = "LEN", *pdt_kind = "KIND";
static const char *threadprivate = "THREADPRIVATE";
static const char *omp_declare_target = "OMP DECLARE TARGET";
static const char *omp_declare_target_link = "OMP DECLARE TARGET LINK";
@@ -707,6 +708,23 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
conf (entry, oacc_declare_deviceptr)
conf (entry, oacc_declare_device_resident)
+ conf (pdt_kind, allocatable)
+ conf (pdt_kind, pointer)
+ conf (pdt_kind, dimension)
+ conf (pdt_kind, codimension)
+
+ conf (pdt_len, allocatable)
+ conf (pdt_len, pointer)
+ conf (pdt_len, dimension)
+ conf (pdt_len, codimension)
+
+ if (attr->access == ACCESS_PRIVATE)
+ {
+ a1 = privat;
+ conf2 (pdt_kind);
+ conf2 (pdt_len);
+ }
+
a1 = gfc_code2string (flavors, attr->flavor);
if (attr->in_namelist