diff options
author | Marek Polacek <polacek@redhat.com> | 2025-02-11 15:43:40 -0500 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2025-03-07 12:40:20 -0500 |
commit | aa55a6a30bc4778938af42dac9b624cf67fa4698 (patch) | |
tree | d6266968813bce62f5dec6584de81651b1d37f1f /gcc/dwarf2ctf.cc | |
parent | c781da2c10641a651019f8fe77f57ccdbc49f024 (diff) | |
download | gcc-aa55a6a30bc4778938af42dac9b624cf67fa4698.zip gcc-aa55a6a30bc4778938af42dac9b624cf67fa4698.tar.gz gcc-aa55a6a30bc4778938af42dac9b624cf67fa4698.tar.bz2 |
c++: ICE with operator new[] in constexpr [PR118775]
Here we ICE since r11-7740 because we no longer say that (long)&a
(where a is a global var) is non_constant_p. So VERIFY_CONSTANT
does not return and we crash on tree_to_uhwi. We should check
tree_fits_uhwi_p before calling tree_to_uhwi.
PR c++/118775
gcc/cp/ChangeLog:
* constexpr.cc (cxx_eval_call_expression): Check tree_fits_uhwi_p.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/constexpr-new24.C: New test.
* g++.dg/cpp2a/constexpr-new25.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/dwarf2ctf.cc')
0 files changed, 0 insertions, 0 deletions