aboutsummaryrefslogtreecommitdiff
path: root/gcc/vec.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/vec.h')
-rw-r--r--gcc/vec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/vec.h b/gcc/vec.h
index 9604edb..0ea7a49 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -2514,6 +2514,10 @@ public:
return false;
if (lhs.size () != rhs.size ())
return false;
+ /* Case where either is a NULL pointer and therefore, as both are valid,
+ both are empty slices with length 0. */
+ if (lhs.size () == 0)
+ return true;
return memcmp (lhs.begin (), rhs.begin (), lhs.size ()) == 0;
}