public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5
@ 2021-01-14 18:21 marxin at gcc dot gnu.org
2021-01-14 18:21 ` [Bug c++/98687] " marxin at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-14 18:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
Bug ID: 98687
Summary: [11 Regression] ICE tree check: expected tree that
contains ‘decl minimal’ structure, have ‘overload’ in
diagnose_name_conflict, at cp/name-lookup.c:2729 since
r11-6652-g796ead19f85372e5
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
Reduced from bitcoin package:
$ cat mesh.ii
extern "C" namespace std { void log1p(); }
namespace std_fallback {
template <typename> void log1p();
}
template <typename> struct log1p_impl {
static int run() {
using std::log1p;
using std_fallback::log1p;
return 0;
}
};
void log1p() { log1p_impl<int>::run; }
$ g++ mesh.ii -c
mesh.ii:1:33: warning: declaration of ‘void std::log1p()’ conflicts with
built-in declaration ‘double std::log1p(double)’
[-Wbuiltin-declaration-mismatch]
1 | extern "C" namespace std { void log1p(); }
| ^~~~~
mesh.ii: In instantiation of ‘static int log1p_impl< <template-parameter-1-1>
>::run() [with <template-parameter-1-1> = int]’:
mesh.ii:12:33: required from here
mesh.ii:8:25: internal compiler error: tree check: expected tree that contains
‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at
cp/name-lookup.c:2729
8 | using std_fallback::log1p;
| ^~~~~
0x876572 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
/home/marxin/Programming/gcc/gcc/tree.c:9984
0x6b96d0 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
/home/marxin/Programming/gcc/gcc/tree.h:3452
0x6b96d0 diagnose_name_conflict
/home/marxin/Programming/gcc/gcc/cp/name-lookup.c:2729
0xa9856e supplement_binding_1
/home/marxin/Programming/gcc/gcc/cp/name-lookup.c:2712
0xa9f566 supplement_binding
/home/marxin/Programming/gcc/gcc/cp/name-lookup.c:2750
0xa9f566 push_local_binding
/home/marxin/Programming/gcc/gcc/cp/name-lookup.c:4237
0xb3e19a tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/marxin/Programming/gcc/gcc/cp/pt.c:18138
0xb3e19a tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/marxin/Programming/gcc/gcc/cp/pt.c:18046
0xb3bf61 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/marxin/Programming/gcc/gcc/cp/pt.c:18073
0xb3bf61 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/marxin/Programming/gcc/gcc/cp/pt.c:18046
0xb3ba87 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/marxin/Programming/gcc/gcc/cp/pt.c:18400
0xb3ba87 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/marxin/Programming/gcc/gcc/cp/pt.c:18046
0xb27148 instantiate_body
/home/marxin/Programming/gcc/gcc/cp/pt.c:25748
0xb2832d instantiate_decl(tree_node*, bool, bool)
/home/marxin/Programming/gcc/gcc/cp/pt.c:26037
0xb56bdb instantiate_pending_templates(int)
/home/marxin/Programming/gcc/gcc/cp/pt.c:26116
0xa16c2b c_parse_final_cleanups()
/home/marxin/Programming/gcc/gcc/cp/decl2.c:4965
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/98687] [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5
2021-01-14 18:21 [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5 marxin at gcc dot gnu.org
@ 2021-01-14 18:21 ` marxin at gcc dot gnu.org
2021-01-14 18:24 ` mpolacek at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-14 18:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |10.2.0
Target Milestone|--- |11.0
Ever confirmed|0 |1
Known to fail| |11.0
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-01-14
Priority|P3 |P1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/98687] [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5
2021-01-14 18:21 [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5 marxin at gcc dot gnu.org
2021-01-14 18:21 ` [Bug c++/98687] " marxin at gcc dot gnu.org
@ 2021-01-14 18:24 ` mpolacek at gcc dot gnu.org
2021-01-15 0:56 ` mpolacek at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-14 18:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Well, that was quick. Mine.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/98687] [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5
2021-01-14 18:21 [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5 marxin at gcc dot gnu.org
2021-01-14 18:21 ` [Bug c++/98687] " marxin at gcc dot gnu.org
2021-01-14 18:24 ` mpolacek at gcc dot gnu.org
@ 2021-01-15 0:56 ` mpolacek at gcc dot gnu.org
2021-01-17 20:55 ` dcb314 at hotmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-15 0:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Adjusted test:
extern "C" namespace std {
double log1p(double);
}
namespace std_fallback {
template <typename> void log1p();
}
template <typename> struct log1p_impl {
static int run() {
using std::log1p;
using std_fallback::log1p;
return 0;
}
};
void log1p() { log1p_impl<int>::run(); }
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/98687] [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5
2021-01-14 18:21 [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2021-01-15 0:56 ` mpolacek at gcc dot gnu.org
@ 2021-01-17 20:55 ` dcb314 at hotmail dot com
2021-01-18 16:58 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2021-01-17 20:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
Another test case:
void a();
namespace b {
using ::a;
}
namespace c {
template <class> void a();
template <typename d, typename e> void f(d, e) {
using b::a;
using c::a;
}
template <class g, class h, class e> void i(g j, h, e k) { f(j, k); }
} // namespace c
class l {
double m() const;
};
using c::i;
double l::m() const { i(0, 0, int()); }
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/98687] [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5
2021-01-14 18:21 [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5 marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2021-01-17 20:55 ` dcb314 at hotmail dot com
@ 2021-01-18 16:58 ` redi at gcc dot gnu.org
2021-01-18 17:02 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2021-01-18 16:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |redi at gcc dot gnu.org
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This affects building Boost too.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/98687] [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5
2021-01-14 18:21 [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5 marxin at gcc dot gnu.org
` (4 preceding siblings ...)
2021-01-18 16:58 ` redi at gcc dot gnu.org
@ 2021-01-18 17:02 ` redi at gcc dot gnu.org
2021-01-19 22:13 ` cvs-commit at gcc dot gnu.org
2021-01-19 22:15 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2021-01-18 17:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And the patch at
https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563562.html fixes the
Boost build.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/98687] [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5
2021-01-14 18:21 [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5 marxin at gcc dot gnu.org
` (5 preceding siblings ...)
2021-01-18 17:02 ` redi at gcc dot gnu.org
@ 2021-01-19 22:13 ` cvs-commit at gcc dot gnu.org
2021-01-19 22:15 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-19 22:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:d89b00c095e99cd5cb6d3e05f30d3a61fa592000
commit r11-6802-gd89b00c095e99cd5cb6d3e05f30d3a61fa592000
Author: Marek Polacek <polacek@redhat.com>
Date: Thu Jan 14 22:14:38 2021 -0500
c++: ICE with USING_DECL redeclaration [PR98687]
My recent patch that introduced push_using_decl_bindings didn't
handle USING_DECL redeclaration, therefore things broke. This patch
amends that by breaking out a part of finish_nonmember_using_decl
out to a separate function, push_using_decl_bindings, and calling it.
It needs an overload, because name_lookup is only available inside
of name-lookup.c.
gcc/cp/ChangeLog:
PR c++/98687
* name-lookup.c (push_using_decl_bindings): New, broken out of...
(finish_nonmember_using_decl): ...here.
* name-lookup.h (push_using_decl_bindings): Update declaration.
* pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
gcc/testsuite/ChangeLog:
PR c++/98687
* g++.dg/lookup/using64.C: New test.
* g++.dg/lookup/using65.C: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/98687] [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5
2021-01-14 18:21 [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5 marxin at gcc dot gnu.org
` (6 preceding siblings ...)
2021-01-19 22:13 ` cvs-commit at gcc dot gnu.org
@ 2021-01-19 22:15 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-19 22:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98687
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Should be fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-01-19 22:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 18:21 [Bug c++/98687] New: [11 Regression] ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘overload’ in diagnose_name_conflict, at cp/name-lookup.c:2729 since r11-6652-g796ead19f85372e5 marxin at gcc dot gnu.org
2021-01-14 18:21 ` [Bug c++/98687] " marxin at gcc dot gnu.org
2021-01-14 18:24 ` mpolacek at gcc dot gnu.org
2021-01-15 0:56 ` mpolacek at gcc dot gnu.org
2021-01-17 20:55 ` dcb314 at hotmail dot com
2021-01-18 16:58 ` redi at gcc dot gnu.org
2021-01-18 17:02 ` redi at gcc dot gnu.org
2021-01-19 22:13 ` cvs-commit at gcc dot gnu.org
2021-01-19 22:15 ` mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).