re PR c++/85462 (internal compiler error: in inc_refcount_use, at cp/pt.c:8955)
authorJakub Jelinek <jakub@redhat.com>
Fri, 20 Apr 2018 07:56:52 +0000 (09:56 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 20 Apr 2018 07:56:52 +0000 (09:56 +0200)
commite00e62761dbd91200af4e448ff13b598d918049f
treeb6a5a85592d6403d62b68e65139c16a6ef74fdf5
parent774c08306d605bff4ffa217121fc2da45ee240bd
re PR c++/85462 (internal compiler error: in inc_refcount_use, at cp/pt.c:8955)

PR c++/85462
* cp-tree.h (tinst_level): Remove in_system_header_p member,
change refcount member from unsigned char to unsigned short,
add refcount_infinity static data member, adjust comments.
* pt.c (tinst_level::refcount_infinity): Define.
(inc_refcount_use): Remove assert, don't increment if refcount
is already refcount_infinity, adjust comment.
(dec_refcount_use): Remove assert, don't decrement if refcount
is refcount_infinity, adjust comment.
(push_tinst_level_loc): Formatting fix.

* g++.dg/cpp0x/pr85462.C: New test.

From-SVN: r259516
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr85462.C [new file with mode: 0644]