re PR c++/65736 (ICE (in process_init_constructor_array, at cp/typeck2.c:1263))
authorJakub Jelinek <jakub@gcc.gnu.org>
Sun, 12 Apr 2015 19:10:58 +0000 (21:10 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 12 Apr 2015 19:10:58 +0000 (21:10 +0200)
commit6338536c1e438e49c67271708d45b95306506cfd
treea98d933aa30f555ca23fa7b9fe11b58553b4fcb5
parentb8d6284e3a998ac0985943e590c8aff10cd77a99
re PR c++/65736 (ICE (in process_init_constructor_array, at cp/typeck2.c:1263))

PR c++/65736
* constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
don't fold if op01 isn't divisible by TYPE_SIZE_UNIT.  Convert
the expression to the original type at the end.

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

From-SVN: r222022
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr65736.C [new file with mode: 0644]