aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-resolve-path.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-05-10 15:10:59 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2022-05-10 15:15:21 +0200
commit2959ff8e7dd8b06bee76636af84c5aee06971397 (patch)
tree947ce9f45a069b8c0c6e844bcd5bec51311d0d9b /gcc/rust/backend/rust-compile-resolve-path.cc
parent140f6a698b4d7157e6a33cd7b41c27b39ecbf76e (diff)
downloadgcc-2959ff8e7dd8b06bee76636af84c5aee06971397.zip
gcc-2959ff8e7dd8b06bee76636af84c5aee06971397.tar.gz
gcc-2959ff8e7dd8b06bee76636af84c5aee06971397.tar.bz2
macro: Add assertion to avoid undefined behavior
This also fixes the undefined behavior. Once again we are hurt by `std::vector<T>::back()` returning references and not pointers/`std::optional<T>`s! The cause of the bug was some overzealous popping from the context vector in block expressions. The amount of calls to `pop_context` is now the same as the amount of calls to `push_context`
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
0 files changed, 0 insertions, 0 deletions