[Bug c++/71537] GCC rejects consetxpr boolean conversions and comparisons on the result of pointer arithmetic.
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 6 09:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71537
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Dec 6 09:24:36 2016
New Revision: 243286
URL: https://gcc.gnu.org/viewcvs?rev=243286&root=gcc&view=rev
Log:
PR c++/71537
* fold-const.c (fold_comparison): Assume CONSTANT_CLASS_P (base0)
plus offset is non-zero. For maybe_nonzero_address decl base0,
require indirect_base0.
* g++.dg/cpp0x/constexpr-71537.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-71537.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list