diff options
author | Martin Sebor <msebor@redhat.com> | 2021-02-24 08:57:59 -0700 |
---|---|---|
committer | Martin Sebor <msebor@redhat.com> | 2021-02-24 08:57:59 -0700 |
commit | ea5a82df9ba0c9d23e386290d24fc920968a8695 (patch) | |
tree | 7db76ee52ea00e84163529642ee5a95adbe81c05 /gcc/attribs.c | |
parent | 6c35e79b47ab582e18d851f6c5df776bac766eaf (diff) | |
download | gcc-ea5a82df9ba0c9d23e386290d24fc920968a8695.tar.gz |
PR middle-end/97172 - ICE: tree code 'ssa_name' is not supported in LTO streams
gcc/ChangeLog:
PR middle-end/97172
* attribs.c (attr_access::free_lang_data): Clear attribute arg spec
from function arguments.
gcc/c/ChangeLog:
PR middle-end/97172
* c-decl.c (free_attr_access_data): Clear attribute arg spec.
gcc/testsuite/ChangeLog:
PR middle-end/97172
* gcc.dg/pr97172-2.c: New test.
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r-- | gcc/attribs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c index 60933d20810..16c6b12d477 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -2265,6 +2265,14 @@ attr_access::free_lang_data (tree attrs) *pvbnd = NULL_TREE; } } + + for (tree argspec = attrs; (argspec = lookup_attribute ("arg spec", argspec)); + argspec = TREE_CHAIN (argspec)) + { + /* Same as above. */ + tree *pvblist = &TREE_VALUE (argspec); + *pvblist = NULL_TREE; + } } /* Defined in attr_access. */ |