aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-constexpr.cc
diff options
context:
space:
mode:
authorFaisal Abbas <90.abbasfaisal@gmail.com>2022-08-23 17:47:59 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-08-25 12:40:28 +0100
commit5a8f2fd653afe2e60672678d9cbfe0fa8a5e4124 (patch)
treebf5cc532faae91c399f363bcfed30161b121e908 /gcc/rust/backend/rust-constexpr.cc
parentf83e254c29dc3690603e06a98d94b3d39eb853d7 (diff)
downloadgcc-5a8f2fd653afe2e60672678d9cbfe0fa8a5e4124.zip
gcc-5a8f2fd653afe2e60672678d9cbfe0fa8a5e4124.tar.gz
gcc-5a8f2fd653afe2e60672678d9cbfe0fa8a5e4124.tar.bz2
rust-constexpr.cc: fixes
- error in handling of NOP_EXPR which results in failure in make check-rust - DECL not being marked constant inside finalize_intrinsic_block Signed-off-by: Faisal Abbas <90.abbasfaisal@gmail.com>
Diffstat (limited to 'gcc/rust/backend/rust-constexpr.cc')
-rw-r--r--gcc/rust/backend/rust-constexpr.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc
index ed0fc2c..36da7cb 100644
--- a/gcc/rust/backend/rust-constexpr.cc
+++ b/gcc/rust/backend/rust-constexpr.cc
@@ -5795,14 +5795,8 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
}
return true;
- case NOP_EXPR:
- if (REINTERPRET_CAST_P (t))
- {
- if (flags & tf_error)
- error_at (loc, "%<reinterpret_cast%> is not a constant expression");
- return false;
- }
/* FALLTHRU */
+ case NOP_EXPR:
case CONVERT_EXPR:
case VIEW_CONVERT_EXPR:
/* -- a reinterpret_cast. FIXME not implemented, and this rule