diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-05-29 21:12:21 -0400 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:09:24 -0300 |
commit | 4e03ad3985a1693363649db90f2f1a2e1fe629bb (patch) | |
tree | 918cc48935a36759ee3de12e5f12ac8e969ba8f3 /gcc/gimple-array-bounds.cc | |
parent | cf93e17048524b2ab2e80cf3d27c8566ed0031bb (diff) | |
download | gcc-4e03ad3985a1693363649db90f2f1a2e1fe629bb.zip gcc-4e03ad3985a1693363649db90f2f1a2e1fe629bb.tar.gz gcc-4e03ad3985a1693363649db90f2f1a2e1fe629bb.tar.bz2 |
c++: satisfaction value of type typedef to bool [PR95386]
In the testcase below, the satisfaction value of fn1<int>'s constraint
is INTEGER_CST '1' of type BOOLEAN_TYPE value_type, which is a typedef
to the standard boolean_type_node. But satisfaction_value expects to
see exactly boolean_true_node or integer_one_node, which this value is
neither, causing us to trip over the assert therein.
This patch changes satisfaction_value to accept INTEGER_CST of any
boolean type.
gcc/cp/ChangeLog:
PR c++/95386
* constraint.cc (satisfaction_value): Accept INTEGER_CST of any
boolean type.
gcc/testsuite/ChangeLog:
PR c++/95386
* g++.dg/concepts/pr95386.C: New test.
Diffstat (limited to 'gcc/gimple-array-bounds.cc')
0 files changed, 0 insertions, 0 deletions