tiemann@YAHI.STANFORD.EDU (Michael Tiemann) (05/07/89)
Doug reported two problems, an infinite loop I could not reproduce, and a problem with static class members, which I could. These problems were due to poorly ingested GCC code. Here are the diffs: yahi% diff -c2 g++-1.35.0-/integrate.c /usr/gnu2/g++/integrate.c *** g++-1.35.0-/integrate.c Sun May 7 00:21:44 1989 --- /usr/gnu2/g++/integrate.c Sun May 7 08:50:11 1989 *************** *** 616,620 **** if (list_length (parms) != nargs) return (rtx)-1; - #if 0 /* Also check that the parms type match. Since the appropriate conversions or default promotions have already been applied, --- 616,619 ---- *************** *** 632,638 **** /* If they are block mode, the types should match exactly. */ if (mode == BLKmode && TREE_TYPE (arg) != TREE_TYPE (formal)) ! return (rtx)-1; } - #endif /* Make a binding contour to keep inline destructors called at --- 631,639 ---- /* If they are block mode, the types should match exactly. */ if (mode == BLKmode && TREE_TYPE (arg) != TREE_TYPE (formal)) ! { ! abort (); ! return (rtx)-1; ! } } /* Make a binding contour to keep inline destructors called at *************** *** 699,702 **** --- 700,707 ---- copy = copy_to_reg (copy); } + /* If passed mode != nominal mode, COPY is now the passed mode. + Convert it to the nominal mode (i.e. truncate it). */ + if (tmode != imode) + copy = convert_to_mode (imode, copy); arg_vec[i] = copy; } *************** *** 1928,1932 **** restore_reg_data (FIRST_PARM_INSN (head)); ! expand_function_end (); for (last = head; NEXT_INSN (last); last = NEXT_INSN (last)) --- 1933,1937 ---- restore_reg_data (FIRST_PARM_INSN (head)); ! expand_function_end (DECL_SOURCE_FILE (fndecl), DECL_SOURCE_LINE (fndecl)); for (last = head; NEXT_INSN (last); last = NEXT_INSN (last)) yahi% diff -c2 g++-1.35.0-/varasm.c /usr/gnu2/g++/varasm.c *** g++-1.35.0-/varasm.c Sun May 7 00:35:38 1989 --- /usr/gnu2/g++/varasm.c Sun May 7 08:57:11 1989 *************** *** 144,148 **** int decode_reg_name (asmspec) ! tree asmspec; { if (asmspec != 0) --- 144,148 ---- int decode_reg_name (asmspec) ! char *asmspec; { if (asmspec != 0) *************** *** 151,159 **** extern char *reg_names[]; - if (TREE_CODE (asmspec) != STRING_CST) - abort (); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! if (!strcmp (TREE_STRING_POINTER (asmspec), ! reg_names[i])) break; --- 151,156 ---- extern char *reg_names[]; for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) ! if (!strcmp (asmspec, reg_names[i])) break; *************** *** 176,180 **** make_decl_rtl (decl, asmspec, top_level) tree decl; ! tree asmspec; int top_level; { --- 173,177 ---- make_decl_rtl (decl, asmspec, top_level) tree decl; ! char *asmspec; int top_level; { *************** *** 184,191 **** if (reg_number == -2) { ! name = (char *) obstack_alloc (saveable_obstack, ! strlen (TREE_STRING_POINTER (asmspec)) + 2); name[0] = '*'; ! strcpy (&name[1], TREE_STRING_POINTER (asmspec)); } --- 181,187 ---- if (reg_number == -2) { ! name = (char *) obstack_alloc (saveable_obstack, strlen (asmspec) + 2); name[0] = '*'; ! strcpy (&name[1], asmspec); } yahi% Michael