diff options
author | Jason Merrill <jason@redhat.com> | 2016-08-09 10:37:12 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-08-09 10:37:12 -0400 |
commit | f4fce1837cb18401b714379b7b18ede89b9d4fe5 (patch) | |
tree | d4fe460d03cc97a614f2d409ef0bc31a0ae16c96 /gcc/cp/class.c | |
parent | 810a3aa6bbdc5d2fd058f60683ea5c22c427eddd (diff) | |
download | gcc-f4fce1837cb18401b714379b7b18ede89b9d4fe5.zip gcc-f4fce1837cb18401b714379b7b18ede89b9d4fe5.tar.gz gcc-f4fce1837cb18401b714379b7b18ede89b9d4fe5.tar.bz2 |
PR c++/72849 - ICE with incomplete class.
* constexpr.c (cxx_eval_constant_expression): Check
COMPLETE_TYPE_P before calling is_really_empty_class.
* class.c (is_really_empty_class): Don't call complete_type.
From-SVN: r239289
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index e7cfabd..8249d93 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -8419,7 +8419,7 @@ is_really_empty_class (tree type) /* CLASSTYPE_EMPTY_P isn't set properly until the class is actually laid out, but we'd like to be able to check this before then. */ - if (COMPLETE_TYPE_P (complete_type (type)) && is_empty_class (type)) + if (COMPLETE_TYPE_P (type) && is_empty_class (type)) return true; for (binfo = TYPE_BINFO (type), i = 0; |