The attached patch fixes the outstanding cases mentioned in comment 10 on bug c++/67376. While testing the fix I uncovered a number of other related problems without which the test would have been incomplete. They include: PR c++/70170 - [6 regression] bogus not a constant expression error comparing pointer to array to null PR c++/70172 - incorrect reinterpret_cast from integer to pointer error on invalid constexpr initialization PR c++/60760 - arithmetic on null pointers should not be allowed in constant expressions In addition, I include a fix for the issue below that I also came across while testing the patch and that makes root causing constexpr problems due to out-of-bounds array subscripts easier: PR c++/70228 - insufficient detail in diagnostics for a constexpr out of bounds array subscript In a discussion of bug 70170 between those CC'd Marek posted a prototype patch for match.pd. While the patch seems to do the right thing as far as the bug goes, like my own first attempt at a fix in const-fold.c it caused a couple of regressions (in pr21294.c and in pr44555.c). Since I'm not yet familiar enough with match.pd, in the interest of time I solved those regressions in const-fold.c rather than in match.pd. Tested on x86_64. Martin