diff options
author | Sergei Trofimovich <siarheit@google.com> | 2021-08-06 16:14:16 +0100 |
---|---|---|
committer | Sergei Trofimovich <siarheit@google.com> | 2021-08-12 19:43:07 +0100 |
commit | 27a1fb385b7fe706f05608e53f3e91d7d3442b8b (patch) | |
tree | 8a287d4386e764feec86d9c179a5f77552b693e9 /gcc/tree.c | |
parent | d2ba65ab6010f0d507bf5512a0223692e6653b23 (diff) | |
download | gcc-27a1fb385b7fe706f05608e53f3e91d7d3442b8b.zip gcc-27a1fb385b7fe706f05608e53f3e91d7d3442b8b.tar.gz gcc-27a1fb385b7fe706f05608e53f3e91d7d3442b8b.tar.bz2 |
c++: fix ptrmemfunc template instantiation [PR101219]
r12-1804 ("cp: add support for per-location warning groups.") among other
things removed warning suppression from a few places including ptrmemfuncs.
This exposed a bug in warning detection code as a reference to missing
BINFO (it's intentionally missing for ptrmemfunc types):
crash_signal
gcc/toplev.c:328
perform_or_defer_access_check(tree_node*, tree_node*, tree_node*, int, access_failure_info*)
gcc/cp/semantics.c:490
finish_non_static_data_member(tree_node*, tree_node*, tree_node*)
gcc/cp/semantics.c:2208
...
The change special cases ptrmemfuncs in templace substitution by using
build_ptrmemfunc_access_expr() instead of finish_non_static_data_member().
gcc/cp/ChangeLog:
PR c++/101219
* pt.c (tsubst_copy_and_build): Use build_ptrmemfunc_access_expr
to construct ptrmemfunc expression instantiation.
gcc/testsuite/ChangeLog:
PR c++/101219
* g++.dg/warn/pr101219.C: New test.
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions