public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] gccrs: Fix ICE in assignment of error type bound predicates
@ 2023-05-02  7:10 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-05-02  7:10 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:028a5bb8ed10c202d024a544b9ca3087a0fcd90c

commit 028a5bb8ed10c202d024a544b9ca3087a0fcd90c
Author: Philip Herron <herron.philip@googlemail.com>
Date:   Thu Apr 20 11:55:20 2023 +0100

    gccrs: Fix ICE in assignment of error type bound predicates
    
    gcc/rust/ChangeLog:
    
            * typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::operator=):
            we are done if other is in an error state
    
    Signed-off-by: Philip Herron <herron.philip@googlemail.com>

Diff:
---
 gcc/rust/typecheck/rust-tyty-bounds.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/rust/typecheck/rust-tyty-bounds.cc b/gcc/rust/typecheck/rust-tyty-bounds.cc
index 6f946bd6550..defa0ec1edf 100644
--- a/gcc/rust/typecheck/rust-tyty-bounds.cc
+++ b/gcc/rust/typecheck/rust-tyty-bounds.cc
@@ -360,6 +360,9 @@ TypeBoundPredicate::operator= (const TypeBoundPredicate &other)
   for (const auto &p : other.get_substs ())
     substitutions.push_back (p.clone ());
 
+  if (other.is_error ())
+    return *this;
+
   std::vector<SubstitutionArg> mappings;
   for (size_t i = 0; i < other.used_arguments.get_mappings ().size (); i++)
     {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-02  7:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02  7:10 [gcc/devel/rust/master] gccrs: Fix ICE in assignment of error type bound predicates 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).