aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-08-03 11:58:06 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-08-04 15:48:37 +0100
commit405d9f1d135771015199546cd1c224ba589ab48d (patch)
treed7d397f76ca483d1351a3205b5dd0f17d179a475 /gcc/rust/backend/rust-compile-expr.h
parent94e53f8e55e93da8db3d948c3f16d23b7c4ba7a6 (diff)
downloadgcc-405d9f1d135771015199546cd1c224ba589ab48d.zip
gcc-405d9f1d135771015199546cd1c224ba589ab48d.tar.gz
gcc-405d9f1d135771015199546cd1c224ba589ab48d.tar.bz2
Fix ICE with duplicate hirid on autoderef coercion site mappings
Imagine the call expression: Foo(a+b) But the a+b is an operator overload of the assignment operation. We store the autoderef coercions on the HIR id of the plus_expression here which is going to conflict with the id used to store the autoderef coercions the argument a+b. So this patch changes that all autoderef coercions store the autoderef for the implicit method call on the hirid of the lvalue hirid which in this case is 'a'. This means we won't conflict and cause an ICE in this case.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
0 files changed, 0 insertions, 0 deletions