public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1240 #1243
@ 2022-06-08 12:46 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:46 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f2aee09a0b72eec4732cc2e3324bf62729539f88
commit f2aee09a0b72eec4732cc2e3324bf62729539f88
Merge: c1ff79996ac d2dcac6a0bf 2e65c14bef9
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Wed May 11 08:34:05 2022 +0000
Merge #1240 #1243
1240: Change Artihmetic Operation to be a cast type operation r=philberty a=philberty
Arithmetic operations like this need a cast to support the range of integer
types which are allow here.
Fixes #1234
1243: Allow cast of integers to pointers r=philberty a=philberty
This adds the cast rules of integer types and integer inference variables
to pointers. The code-generation needed to remove the bad assertion that
all integer literals were always going to be of type integer. This also
needed a tweak to a bad port from the cp/constexpr.cc code which assumed
that all integer_cst of pointer types would be a zero pointer which was
used to detect cases of bad method pointers in CPP which we does not apply
here.
see gcc/cp/constexpr.cc:6564-6488
Fixes #1226
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diff:
gcc/rust/backend/rust-compile-expr.cc | 1 -
gcc/rust/backend/rust-constexpr.cc | 12 +-----------
gcc/rust/typecheck/rust-hir-type-check-expr.h | 12 +++++++++++-
gcc/rust/typecheck/rust-tyty-cast.h | 11 +++++++++--
gcc/testsuite/rust/compile/issue-1226.rs | 6 ++++++
gcc/testsuite/rust/compile/issue-1234.rs | 4 ++++
6 files changed, 31 insertions(+), 15 deletions(-)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 12:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:46 [gcc/devel/rust/master] Merge #1240 #1243 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).