diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-05-29 21:12:21 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2020-05-29 21:12:21 -0400 |
commit | aef6e234a8a78db39b4ba034cc4c100c07c294a7 (patch) | |
tree | 7ddbd61f63e9768bb33c105e39f46babf39ca566 /gcc/tree-iterator.c | |
parent | 885ef72f270cf8e58066681e70fb05d846ac426e (diff) | |
download | gcc-aef6e234a8a78db39b4ba034cc4c100c07c294a7.zip gcc-aef6e234a8a78db39b4ba034cc4c100c07c294a7.tar.gz gcc-aef6e234a8a78db39b4ba034cc4c100c07c294a7.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/tree-iterator.c')
0 files changed, 0 insertions, 0 deletions