]> gcc.gnu.org Git - gcc.git/commit
cp: Explicitly null-derive some pointers
authorAlex Coplan <alex.coplan@arm.com>
Fri, 28 Jan 2022 16:17:42 +0000 (16:17 +0000)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 28 Feb 2022 12:06:30 +0000 (12:06 +0000)
commitf58ba93e83426e0c296e71b19eac7a64cfdc2cf5
treed900967bad7cae6bf0fba203dd1330857c72d09a
parentc765078578688e8a16e6632c7180b0b2389ccd55
cp: Explicitly null-derive some pointers

The C++ frontend sometimes constructs pointers from constant integers by
directly converting them. This patch null-derives these instead in a
couple of places to avoid ICEs.

gcc/cp/ChangeLog:

* class.c (build_rtti_vtbl_entries): We can't simply convert
integers into capability pointers: null-derive these instead
(e.g. when putting an offset into a vtable).
* method.c (build_stub_object): When building our dummy
reference, null-derive a capability instead of just trying to
convert integer_one_node into a capability type.
gcc/cp/class.c
gcc/cp/method.c
This page took 0.065064 seconds and 6 git commands to generate.