--- ./gdb/gdbtypes.c_orig       2021-11-17 07:19:54.322932994 -0600
+++ ./gdb/gdbtypes.c    2021-11-20 02:59:24.757737697 -0600
@@ -928,7 +928,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 (TYPE_LENGTH (index_type) > 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 (TYPE_LENGTH (index_type) > 0);

   if (result_type == NULL)
     result_type = alloc_type_copy (index_type);

