diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-08-04 20:25:59 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-08-04 20:36:46 +0100 |
commit | 7022b9dd107e534896d8383f6bc4ce70b4726cc9 (patch) | |
tree | d42eca280664839dae014a2a6feac37870f2b921 /gcc/rust/backend/rust-compile-struct-field-expr.h | |
parent | c788a806195f326a595cd15b96c59e7584927f1a (diff) | |
download | gcc-7022b9dd107e534896d8383f6bc4ce70b4726cc9.zip gcc-7022b9dd107e534896d8383f6bc4ce70b4726cc9.tar.gz gcc-7022b9dd107e534896d8383f6bc4ce70b4726cc9.tar.bz2 |
Fix bad transmute for aggregate types
This changes the CONVERT_EXPR to use the same *(foo*)&bar style cast from
the c front-end to handle the case of:
int a[1];
int b = (int)a;
Which is converted into:
int b = *(int*)&a;
which the constant folders can turn directly into int b = a[0];
Fixes #1432
Diffstat (limited to 'gcc/rust/backend/rust-compile-struct-field-expr.h')
0 files changed, 0 insertions, 0 deletions