On Wed, Dec 13, 2017 at 12:54 PM, Martin Sebor <mse...@gmail.com> wrote: > The attached update also fixes both instances of the ICE > reported in bug 83322 and supersedes Jakub's patch for that > bug (https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00765.html). > This passes bootstrap on x86_64 with no new regressions (there > are an increasing number of failures on trunk at the moment > but, AFAICS, none caused by this patch). > > Jason, I'm still trying to come up with a test case for templates > that would illustrate the issue you're concerned about. If you > have one that would be great (preferably one showing a regression).
I looked at the case I was concerned about, and found that it isn't an issue because in that case we call duplicate_decls before applying attributes. But it looks like we'll still get this testcase wrong, because the code assumes that if the old decl is a single _DECL, it must match. [[gnu::noinline]] void f() { } [[gnu::always_inline]] void f(int) { } // OK, not the same function I think the answer is to use Nathan's new iterators unconditionally, probably lkp_iterator. Jason