diff --git a/lang/cem/cemcom.ansi/idf.c b/lang/cem/cemcom.ansi/idf.c index ebb9014a..fe038bbb 100644 --- a/lang/cem/cemcom.ansi/idf.c +++ b/lang/cem/cemcom.ansi/idf.c @@ -536,14 +536,14 @@ declare_formals(idf, fp) parameter starts on a new word boundary. */ f_offset = align(f_offset + def->df_type->tp_size, (int) word_size); + RegisterAccount(def->df_address, def->df_type->tp_size, + regtype(def->df_type), + def->df_sc); /* cvt int to char or short and double to float, if necessary */ formal_cvt(hasproto, def); def->df_level = L_FORMAL2; /* CJ */ - RegisterAccount(def->df_address, def->df_type->tp_size, - regtype(def->df_type), - def->df_sc); if (nparams++ >= STDC_NPARAMS) strict("number of formal parameters exceeds ANSI limit"); #ifdef DBSYMTAB diff --git a/lang/cem/cemcom.ansi/util.c b/lang/cem/cemcom.ansi/util.c index 4ffe7ed5..fa51a525 100644 --- a/lang/cem/cemcom.ansi/util.c +++ b/lang/cem/cemcom.ansi/util.c @@ -205,6 +205,7 @@ LoadLocal(off, sz) if (p) p->t_count++; #endif #endif + if (p && p->t_size != sz) p->t_regtype = -1; if (sz == word_size) C_lol(off); else if (sz == dword_size) C_ldl(off); else { @@ -224,6 +225,7 @@ StoreLocal(off, sz) if (p) p->t_count++; #endif #endif + if (p && p->t_size != sz) p->t_regtype = -1; if (sz == word_size) C_stl(off); else if (sz == dword_size) C_sdl(off); else {