PR c++/82165 - enum bitfields and operator overloading.
authorJason Merrill <jason@redhat.com>
Mon, 16 Sep 2019 04:34:23 +0000 (00:34 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 16 Sep 2019 04:34:23 +0000 (00:34 -0400)
commit47518e131f299f69d0c14f7e5efe83609185ed9f
treeb90c2e33bc4eee6596a3fc5d7bccd6c8014dab24
parenta4d034d714f5799d3038aaf85347923686c7db64
PR c++/82165 - enum bitfields and operator overloading.

In this testcase, !f.b0 was failing to call the overloaded operator because
TREE_TYPE is the magic bitfield integer type, and we weren't using
unlowered_expr_type the way we do in other places.  It would be nice if we
could give bit-field COMPONENT_REFs their declared type until genericization
time...

* call.c (build_new_op_1): Use unlowered_expr_type.

From-SVN: r275745
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/g++.dg/expr/bitfield13.C [new file with mode: 0644]