aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/resolve.c13
-rw-r--r--gcc/fortran/symbol.c2
3 files changed, 19 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 78ee5a9..edb5038 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/44446
+ * symbol.c (check_conflict): Move protected--external/procedure check ...
+ * resolve.c (resolve_select_type): ... to the resolution stage.
+
2010-06-07 Tobias Burnus <burnus@net-b.de>
* options.c (gfc_handle_option): Fix -fno-recursive.
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 7e5a4f9..e4c7394 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -11311,6 +11311,19 @@ resolve_symbol (gfc_symbol *sym)
}
}
+ if (sym->attr.is_protected && !sym->attr.proc_pointer
+ && (sym->attr.procedure || sym->attr.external))
+ {
+ if (sym->attr.external)
+ gfc_error ("PROTECTED attribute conflicts with EXTERNAL attribute "
+ "at %L", &sym->declared_at);
+ else
+ gfc_error ("PROCEDURE attribute conflicts with PROTECTED attribute "
+ "at %L", &sym->declared_at);
+
+ return;
+ }
+
if (sym->attr.flavor == FL_DERIVED && resolve_fl_derived (sym) == FAILURE)
return;
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index b436de5..adae49f 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -567,7 +567,6 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
}
conf (is_protected, intrinsic)
- conf (is_protected, external)
conf (is_protected, in_common)
conf (asynchronous, intrinsic)
@@ -587,7 +586,6 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
conf (procedure, dimension)
conf (procedure, codimension)
conf (procedure, intrinsic)
- conf (procedure, is_protected)
conf (procedure, target)
conf (procedure, value)
conf (procedure, volatile_)