[COMMITTED] gccrs: remove bad assertion

Message ID 20230131132641.663441-1-arthur.cohen@embecosm.com
State Committed
Commit a0c2ea3ee6e47f4090759ad4cacd43225ceea669
Headers
Series [COMMITTED] gccrs: remove bad assertion |

Commit Message

Arthur Cohen Jan. 31, 2023, 1:26 p.m. UTC
  From: Philip Herron <philip.herron@embecosm.com>

gcc/rust/ChangeLog:

	* backend/rust-tree.cc (rs_type_quals): Comment out bad assertion

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/rust/backend/rust-tree.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc
index d2ddcfd2957..47506d6792a 100644
--- a/gcc/rust/backend/rust-tree.cc
+++ b/gcc/rust/backend/rust-tree.cc
@@ -974,9 +974,10 @@  rs_type_quals (const_tree type)
     return TYPE_UNQUALIFIED;
   quals = TYPE_QUALS (type);
   /* METHOD and REFERENCE_TYPEs should never have quals.  */
-  gcc_assert (
-    (TREE_CODE (type) != METHOD_TYPE && !TYPE_REF_P (type))
-    || ((quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE)) == TYPE_UNQUALIFIED));
+  // gcc_assert (
+  //   (TREE_CODE (type) != METHOD_TYPE && !TYPE_REF_P (type))
+  //   || ((quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE)) ==
+  //   TYPE_UNQUALIFIED));
   return quals;
 }