--- ./gdb/gdbtypes.c_orig	2023-05-25 01:41:06.317242945 +0000
+++ ./gdb/gdbtypes.c	2023-05-25 01:46:30.080519659 +0000
@@ -936,7 +936,9 @@
   /* The INDEX_TYPE should be a type capable of holding the upper and lower
      bounds, as such a zero sized, or void type makes no sense.  */
   gdb_assert (index_type->code () != TYPE_CODE_VOID);
-  gdb_assert (index_type->length () > 0);
+  /* for stabs cases like t11=ar0;0;9;5 where ar0 won't be defined for xlc */
+  if (index_type->code () != TYPE_CODE_UNDEF)
+    gdb_assert (index_type->length () > 0);
 
   if (result_type == NULL)
     result_type = alloc_type_copy (index_type);
