+};
+
+/* Returns an XCOFF fundamental type number for DECL (assumed to be a
+ TYPE_DECL), or 0 if dbxout.c should assign a type number normally. */
+int
+xcoff_assign_fundamental_type_number (tree decl)
+{
+ const char *name;
+ size_t i;
+
+ /* Do not waste time searching the list for non-intrinsic types. */
+ if (DECL_NAME (decl) == 0 || ! DECL_IS_BUILTIN (decl))
+ return 0;
+
+ name = IDENTIFIER_POINTER (DECL_NAME (decl));
+
+ /* Linear search, blech, but the list is too small to bother
+ doing anything else. */
+ for (i = 0; i < ARRAY_SIZE (xcoff_type_numbers); i++)
+ if (!strcmp (xcoff_type_numbers[i].name, name))
+ goto found;
+ return 0;
+
+ found:
+ /* -4 and -10 should be replaced with -31 and -32, respectively,
+ when used for a 64-bit type. */
+ if (int_size_in_bytes (TREE_TYPE (decl)) == 8)
+ {
+ if (xcoff_type_numbers[i].number == -4)
+ return -31;
+ if (xcoff_type_numbers[i].number == -10)
+ return -32;
+ }
+ return xcoff_type_numbers[i].number;