Fixed bug: old-style float parameters resulted in wrong addresses for following param...
authorceriel <none@none>
Thu, 16 Apr 1992 16:29:35 +0000 (16:29 +0000)
committerceriel <none@none>
Thu, 16 Apr 1992 16:29:35 +0000 (16:29 +0000)
lang/cem/cemcom.ansi/idf.c

index 5275cb1..4aa5ee7 100644 (file)
@@ -535,7 +535,12 @@ declare_formals(idf, fp)
                        word boundaries, i.e. take care that the following
                        parameter starts on a new word boundary.
                */
-               f_offset = align(f_offset + def->df_type->tp_size, (int) word_size);
+               if (! hasproto 
+                   && def->df_type->tp_fund == FLOAT
+                   && def->df_type->tp_size != double_size) {
+                       f_offset = align(f_offset + double_size, (int) word_size);
+               }
+               else 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);