From 5d9c7f4d9b030651da065d3033517c8427074f62 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 16 Apr 1992 16:29:35 +0000 Subject: [PATCH] Fixed bug: old-style float parameters resulted in wrong addresses for following parameters --- lang/cem/cemcom.ansi/idf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lang/cem/cemcom.ansi/idf.c b/lang/cem/cemcom.ansi/idf.c index 5275cb151..4aa5ee7f9 100644 --- a/lang/cem/cemcom.ansi/idf.c +++ b/lang/cem/cemcom.ansi/idf.c @@ -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); -- 2.34.1