re PR c++/84590 (-fsanitize=undefined internal compiler error: tree check: expected...
authorMarek Polacek <polacek@redhat.com>
Fri, 2 Mar 2018 09:48:41 +0000 (09:48 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 2 Mar 2018 09:48:41 +0000 (09:48 +0000)
commit587b2f674c954f9e5fd8786c655d763c090a85de
treed050d053d16898f2fe3fc4f5ddd9911f8ae95b69
parent70088b953b22eb6a9878d272e4e2a8add136ebc8
re PR c++/84590 (-fsanitize=undefined internal compiler error: tree check: expected constructor, have target_expr in split_nonconstant_init_1, at cp/typeck2.c:629)

PR c++/84590
* cp-gimplify.c (cp_fully_fold): Unwrap TARGET_EXPR or a CONSTRUCTOR
wrapped in VIEW_CONVERT_EXPR.

* c-c++-common/ubsan/shift-11.c: New test.

From-SVN: r258132
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/shift-11.c [new file with mode: 0644]