aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2020-11-03 09:55:58 +0100
committerTobias Burnus <tobias@codesourcery.com>2020-11-03 09:55:58 +0100
commit0caf400a865cb771f76bf1025cfc2a83e8ef00ed (patch)
tree259379fab27182a6be222d90c4f7ff3ca0778481 /gcc/fortran/trans-decl.c
parent682ed7ad230f6177aadc060788e6f4a0780d8860 (diff)
downloadgcc-0caf400a865cb771f76bf1025cfc2a83e8ef00ed.zip
gcc-0caf400a865cb771f76bf1025cfc2a83e8ef00ed.tar.gz
gcc-0caf400a865cb771f76bf1025cfc2a83e8ef00ed.tar.bz2
Fortran: Add !GCC$ attributes DEPRECATED
gcc/fortran/ChangeLog: * decl.c (ext_attr_list): Add EXT_ATTR_DEPRECATED. * gfortran.h (ext_attr_id_t): Ditto. * gfortran.texi (GCC$ ATTRIBUTES): Document it. * resolve.c (resolve_variable, resolve_function, resolve_call, resolve_values): Show -Wdeprecated-declarations warning. * trans-decl.c (add_attributes_to_decl): Skip those with no middle_end_name. gcc/testsuite/ChangeLog: * gfortran.dg/attr_deprecated.f90: New test.
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r--gcc/fortran/trans-decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index fca1622..cdef753 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1427,7 +1427,7 @@ add_attributes_to_decl (symbol_attribute sym_attr, tree list)
tree attr;
for (id = 0; id < EXT_ATTR_NUM; id++)
- if (sym_attr.ext_attr & (1 << id))
+ if (sym_attr.ext_attr & (1 << id) && ext_attr_list[id].middle_end_name)
{
attr = build_tree_list (
get_identifier (ext_attr_list[id].middle_end_name),