PR c++/65736
commit51a019c5c7c91086a785dd4ee854439553096629
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Apr 2015 19:10:58 +0000 (12 19:10 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 12 Apr 2015 19:10:58 +0000 (12 19:10 +0000)
treea98d933aa30f555ca23fa7b9fe11b58553b4fcb5
parentc728499b4f85443b6c4122656df1d8462f0dcf49
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222022 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr65736.C [new file with mode: 0644]