public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1433
@ 2022-08-06 12:10 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-08-06 12:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e77bc10ba13af4e193bbda5f43006d11d9bccb45
commit e77bc10ba13af4e193bbda5f43006d11d9bccb45
Merge: bc65cac0e79 7022b9dd107
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Fri Aug 5 09:33:52 2022 +0000
Merge #1433
1433: Fix bad transmute for aggregate types r=philberty a=philberty
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
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diff:
gcc/rust/backend/rust-compile-intrinsic.cc | 18 +++++-
gcc/testsuite/rust/compile/torture/issue-1432.rs | 72 ++++++++++++++++++++++++
2 files changed, 88 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-06 12:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-06 12:10 [gcc/devel/rust/master] Merge #1433 Thomas Schwinge
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).