This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Avoid ICE due to the attribute exclusion additions (PR c++/83322)
- From: Martin Sebor <msebor at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Jason Merrill <jason at redhat dot com>, Nathan Sidwell <nathan at acm dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 12 Dec 2017 12:55:29 -0700
- Subject: Re: [C++ PATCH] Avoid ICE due to the attribute exclusion additions (PR c++/83322)
- Authentication-results: sourceware.org; auth=none
- References: <20171212190124.GY2353@tucnak>
On 12/12/2017 12:01 PM, Jakub Jelinek wrote:
Hi!
This patch avoids ICEs when last_decl isn't a decl.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
Though, I believe it would be better to do the attribute exclusions check
in duplicate_decls instead if the attributes don't appear together already
on a single decl, instead of trying to do another lookup. I've filed a PR
where it makes a difference.
The reason for implementing attribute checking in the middle-end
is so that it can be done consistently across all front-ends and
back-ends, without back-end maintainers having to change the front
end code, and so that conflicting attributes can be dropped before
they are applied. I went into more detail in my reply to Jason
here:
https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01371.html
I'm just starting to look into the bug you filed (83394) but from
what I've seen so far it seems to be a problem with calling
lookup_name() to find the already declared class member conversion
operator. I'm sure there's a way to look it up and fix the bug
without changing the fundamental design of the improvement.
Martin