diff options
author | Marek Polacek <polacek@redhat.com> | 2023-07-18 16:02:21 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2023-07-21 13:52:19 -0400 |
commit | e36d1994051122fc6e1f8c728fbd109a59e0a822 (patch) | |
tree | 8f11577cbb2b188cea8c1b682bea7cedd1446e8a /gcc/tree-ssa-loop.cc | |
parent | a31ef26b056d0c4f0a9f08b6eb81456ea257298e (diff) | |
download | gcc-e36d1994051122fc6e1f8c728fbd109a59e0a822.zip gcc-e36d1994051122fc6e1f8c728fbd109a59e0a822.tar.gz gcc-e36d1994051122fc6e1f8c728fbd109a59e0a822.tar.bz2 |
c++: fix ICE with is_really_empty_class [PR110106]
is_really_empty_class is liable to crash when it gets an incomplete
or dependent type. Since r11-557, we pass the yet-uninstantiated
class type S<0> of the PARM_DECL s to is_really_empty_class -- because
of the potential_rvalue_constant_expression -> is_rvalue_constant_expression
change in cp_parser_constant_expression. Here we're not parsing
a template so we did not check COMPLETE_TYPE_P as we should.
It should work to complete the type before checking COMPLETE_TYPE_P.
PR c++/110106
gcc/cp/ChangeLog:
* constexpr.cc (potential_constant_expression_1): Try to complete the
type when !processing_template_decl.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/noexcept80.C: New test.
Diffstat (limited to 'gcc/tree-ssa-loop.cc')
0 files changed, 0 insertions, 0 deletions