diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-03-11 16:12:22 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-03-11 16:12:22 -0800 |
commit | bc636c218f2b28da06cd1404d5b35d1f8cc43fd1 (patch) | |
tree | 764937d8460563db6132d7c75e19b95ef3ea6ea8 /gcc/attribs.c | |
parent | 89d7be42db00cd0953e7d4584877cf50a56ed046 (diff) | |
parent | 7ad5a72c8bc6aa71a0d195ddfa207db01265fe0b (diff) | |
download | gcc-bc636c218f2b28da06cd1404d5b35d1f8cc43fd1.zip gcc-bc636c218f2b28da06cd1404d5b35d1f8cc43fd1.tar.gz gcc-bc636c218f2b28da06cd1404d5b35d1f8cc43fd1.tar.bz2 |
Merge from trunk revision 7ad5a72c8bc6aa71a0d195ddfa207db01265fe0b.
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r-- | gcc/attribs.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c index 81322d4..16c6b12 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -2124,7 +2124,7 @@ init_attr_rdwr_indices (rdwr_map *rwm, tree attrs) if (*m == '$') { ++m; - if (!acc.size) + if (!acc.size && vblist) { /* Extract the list of VLA bounds for the current parameter, store it in ACC.SIZE, and advance @@ -2252,10 +2252,6 @@ attr_access::free_lang_data (tree attrs) if (!vblist) continue; - vblist = TREE_VALUE (vblist); - if (!vblist) - continue; - for (vblist = TREE_VALUE (vblist); vblist; vblist = TREE_CHAIN (vblist)) { tree *pvbnd = &TREE_VALUE (vblist); @@ -2269,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. */ |