public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] c++: Track lifetimes in constant evaluation [PR70331,...]
@ 2023-07-01  3:24 Nathaniel Shead
  2023-07-01  3:28 ` [PATCH v3 1/3] c++: Track lifetimes in constant evaluation [PR70331,PR96630,PR98675] Nathaniel Shead
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Nathaniel Shead @ 2023-07-01  3:24 UTC (permalink / raw)
  To: gcc-patches; +Cc: Patrick Palka

This is an update of the patch series at
https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614811.html

Changes since v2:

- Use a separate 'hash_set' to track expired variables instead of
  adding a flag to 'lang_decl_base'.
- Use 'iloc_sentinel' to propagate location information down to
  subexpressions instead of manually saving and falling back to a
  parent expression's location.
- Update more tests with improved error location information.

Bootstrapped and regtested on x86_64-pc-linux-gnu.

---

Nathaniel Shead (3):
  c++: Track lifetimes in constant evaluation [PR70331,PR96630,PR98675]
  c++: Improve constexpr error for dangling local variables
  c++: Improve location information in constant evaluation

 gcc/cp/constexpr.cc                           | 158 +++++++++++++++---
 gcc/cp/semantics.cc                           |   5 +-
 gcc/cp/typeck.cc                              |   5 +-
 gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C  |  10 +-
 gcc/testsuite/g++.dg/cpp0x/constexpr-70323.C  |   8 +-
 gcc/testsuite/g++.dg/cpp0x/constexpr-70323a.C |   8 +-
 .../g++.dg/cpp0x/constexpr-delete2.C          |   5 +-
 gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C  |   2 +-
 gcc/testsuite/g++.dg/cpp0x/constexpr-ice20.C  |   1 +
 .../g++.dg/cpp0x/constexpr-recursion.C        |   6 +-
 gcc/testsuite/g++.dg/cpp0x/overflow1.C        |   2 +-
 gcc/testsuite/g++.dg/cpp1y/constexpr-89285.C  |   5 +-
 gcc/testsuite/g++.dg/cpp1y/constexpr-89481.C  |   3 +-
 .../g++.dg/cpp1y/constexpr-lifetime1.C        |  14 ++
 .../g++.dg/cpp1y/constexpr-lifetime2.C        |  20 +++
 .../g++.dg/cpp1y/constexpr-lifetime3.C        |  13 ++
 .../g++.dg/cpp1y/constexpr-lifetime4.C        |  11 ++
 .../g++.dg/cpp1y/constexpr-lifetime5.C        |  11 ++
 .../g++.dg/cpp1y/constexpr-tracking-const14.C |   3 +-
 .../g++.dg/cpp1y/constexpr-tracking-const16.C |   3 +-
 .../g++.dg/cpp1y/constexpr-tracking-const18.C |   4 +-
 .../g++.dg/cpp1y/constexpr-tracking-const19.C |   4 +-
 .../g++.dg/cpp1y/constexpr-tracking-const21.C |   4 +-
 .../g++.dg/cpp1y/constexpr-tracking-const22.C |   4 +-
 .../g++.dg/cpp1y/constexpr-tracking-const3.C  |   3 +-
 .../g++.dg/cpp1y/constexpr-tracking-const4.C  |   3 +-
 .../g++.dg/cpp1y/constexpr-tracking-const7.C  |   3 +-
 gcc/testsuite/g++.dg/cpp1y/constexpr-union5.C |   4 +-
 gcc/testsuite/g++.dg/cpp1y/pr68180.C          |   4 +-
 .../g++.dg/cpp1z/constexpr-lambda6.C          |   4 +-
 .../g++.dg/cpp1z/constexpr-lambda8.C          |   5 +-
 gcc/testsuite/g++.dg/cpp2a/bit-cast11.C       |  10 +-
 gcc/testsuite/g++.dg/cpp2a/bit-cast12.C       |  10 +-
 gcc/testsuite/g++.dg/cpp2a/bit-cast14.C       |  14 +-
 gcc/testsuite/g++.dg/cpp2a/constexpr-98122.C  |   4 +-
 .../g++.dg/cpp2a/constexpr-dynamic17.C        |   5 +-
 gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C  |   5 +-
 gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C  |   6 +-
 gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C   |  10 +-
 gcc/testsuite/g++.dg/cpp2a/constinit10.C      |   5 +-
 .../g++.dg/cpp2a/is-corresponding-member4.C   |   4 +-
 gcc/testsuite/g++.dg/ext/constexpr-vla2.C     |   4 +-
 gcc/testsuite/g++.dg/ext/constexpr-vla3.C     |   4 +-
 gcc/testsuite/g++.dg/ubsan/pr63956.C          |  23 +--
 .../g++.dg/warn/Wreturn-local-addr-6.C        |   3 -
 .../25_algorithms/equal/constexpr_neg.cc      |   7 +-
 .../testsuite/26_numerics/gcd/105844.cc       |  10 +-
 .../testsuite/26_numerics/lcm/105844.cc       |  14 +-
 48 files changed, 330 insertions(+), 143 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/cpp1y/constexpr-lifetime1.C
 create mode 100644 gcc/testsuite/g++.dg/cpp1y/constexpr-lifetime2.C
 create mode 100644 gcc/testsuite/g++.dg/cpp1y/constexpr-lifetime3.C
 create mode 100644 gcc/testsuite/g++.dg/cpp1y/constexpr-lifetime4.C
 create mode 100644 gcc/testsuite/g++.dg/cpp1y/constexpr-lifetime5.C

-- 
2.41.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-07-17 16:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-01  3:24 [PATCH v3 0/3] c++: Track lifetimes in constant evaluation [PR70331,...] Nathaniel Shead
2023-07-01  3:28 ` [PATCH v3 1/3] c++: Track lifetimes in constant evaluation [PR70331,PR96630,PR98675] Nathaniel Shead
2023-07-14 15:16   ` Jason Merrill
2023-07-14 22:40     ` Jason Merrill
2023-07-16 13:47     ` Nathaniel Shead
2023-07-17 16:04       ` Jason Merrill
2023-07-01  3:30 ` [PATCH v3 2/3] c++: Improve constexpr error for dangling local variables Nathaniel Shead
2023-07-01  3:30 ` [PATCH v3 3/3] c++: Improve location information in constant evaluation Nathaniel Shead
2023-07-10 19:23 ` [PATCH v3 0/3] c++: Track lifetimes in constant evaluation [PR70331,...] Patrick Palka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).