aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov-io.cc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2022-04-26 16:12:58 -0400
committerMarek Polacek <polacek@redhat.com>2022-04-27 13:09:05 -0400
commit409edcca331296b53842c50d3b789e1b1ccc05e5 (patch)
tree864786d1a89ee3d1955c8753cd57f333f10d28a1 /gcc/gcov-io.cc
parent948e8e401023f6c3153f6d0c449bc5c2899ee7b7 (diff)
downloadgcc-409edcca331296b53842c50d3b789e1b1ccc05e5.zip
gcc-409edcca331296b53842c50d3b789e1b1ccc05e5.tar.gz
gcc-409edcca331296b53842c50d3b789e1b1ccc05e5.tar.bz2
c++: enum in generic lambda at global scope [PR105398]
We crash compiling this test since r11-7993 which changed lookup_template_class_1 so that we only call tsubst_enum when !uses_template_parms (current_nonlambda_scope ()) But here current_nonlambda_scope () is the global NAMESPACE_DECL ::, which doesn't have a type, therefore is considered type-dependent. So we don't call tsubst_enum, and crash in tsubst_copy/CONST_DECL because we didn't find the e1 enumerator. I don't think any namespace can depend on any template parameter, so this patch tweaks uses_template_parms. PR c++/105398 gcc/cp/ChangeLog: * pt.cc (uses_template_parms): Return false for any NAMESPACE_DECL. gcc/testsuite/ChangeLog: * g++.dg/cpp1y/lambda-generic-enum2.C: New test.
Diffstat (limited to 'gcc/gcov-io.cc')
0 files changed, 0 insertions, 0 deletions