aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-constexpr.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-09-27 11:36:35 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2023-01-31 14:16:52 +0100
commit9c60f0e1e5cd5a60d5a057193611aa0c38894cc7 (patch)
treebf2284c63b1487f2eabc48d7cb2b60a0770a78bb /gcc/rust/backend/rust-constexpr.cc
parente1beb624ff5aca1b0e2a98569c93a91fad99fd63 (diff)
downloadgcc-9c60f0e1e5cd5a60d5a057193611aa0c38894cc7.zip
gcc-9c60f0e1e5cd5a60d5a057193611aa0c38894cc7.tar.gz
gcc-9c60f0e1e5cd5a60d5a057193611aa0c38894cc7.tar.bz2
gccrs: Make constexpr constructors type-checking more permissive
gcc/rust/ChangeLog: * backend/rust-constexpr.cc (eval_store_expression): Remove invalid assertion on constexpr constructors.
Diffstat (limited to 'gcc/rust/backend/rust-constexpr.cc')
-rw-r--r--gcc/rust/backend/rust-constexpr.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc
index 8efb430..8623816 100644
--- a/gcc/rust/backend/rust-constexpr.cc
+++ b/gcc/rust/backend/rust-constexpr.cc
@@ -2953,14 +2953,14 @@ eval_store_expression (const constexpr_ctx *ctx, tree t, bool lval,
TREE_SIDE_EFFECTS (*valp) = TREE_SIDE_EFFECTS (init);
CONSTRUCTOR_NO_CLEARING (*valp) = CONSTRUCTOR_NO_CLEARING (init);
}
- else if (TREE_CODE (init) == CONSTRUCTOR
- && !same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (init),
- type))
- {
- /* See above on initialization of empty bases. */
- gcc_assert (is_empty_class (TREE_TYPE (init)) && !lval);
- return init;
- }
+ // else if (TREE_CODE (init) == CONSTRUCTOR
+ // && !same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (init),
+ // type))
+ // {
+ // /* See above on initialization of empty bases. */
+ // // gcc_assert (is_empty_class (TREE_TYPE (init)) && !lval);
+ // return init;
+ // }
else
*valp = init;