re PR c++/86661 (g++ ICE:tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in note_name_declared_in_class, at cp/class.c:8288)
/cp 2018-08-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/86661 * class.c (note_name_declared_in_class): Use location_of in permerror instead of DECL_SOURCE_LOCATION (for OVERLOADs). /testsuite 2018-08-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/86661 * g++.dg/lookup/name-clash12.C: New. From-SVN: r263207
This commit is contained in:
parent
e4837aa9fb
commit
5ebbb72c20
4 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2018-08-01 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/86661
|
||||
* class.c (note_name_declared_in_class): Use location_of in permerror
|
||||
instead of DECL_SOURCE_LOCATION (for OVERLOADs).
|
||||
|
||||
2018-07-31 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
PR debug/86687
|
||||
|
|
|
@ -8285,7 +8285,7 @@ note_name_declared_in_class (tree name, tree decl)
|
|||
A name N used in a class S shall refer to the same declaration
|
||||
in its context and when re-evaluated in the completed scope of
|
||||
S. */
|
||||
if (permerror (DECL_SOURCE_LOCATION (decl),
|
||||
if (permerror (location_of (decl),
|
||||
"declaration of %q#D changes meaning of %qD",
|
||||
decl, OVL_NAME (decl)))
|
||||
inform (location_of ((tree) n->value),
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-08-01 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/86661
|
||||
* g++.dg/lookup/name-clash12.C: New.
|
||||
|
||||
2018-08-01 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* gcc.dg/tree-ssa/ssa-fre-68.c: New testcase.
|
||||
|
|
9
gcc/testsuite/g++.dg/lookup/name-clash12.C
Normal file
9
gcc/testsuite/g++.dg/lookup/name-clash12.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// PR c++/86661
|
||||
|
||||
typedef int a; // { dg-message "declared here" }
|
||||
namespace {
|
||||
class b {
|
||||
a c;
|
||||
template <typename> void a(); // { dg-error "changes meaning" }
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue