From patchwork Sun Jul 25 21:56:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [SPARC] Fix PR target/44942 Date: Sun, 25 Jul 2010 11:56:09 -0000 From: Eric Botcazou X-Patchwork-Id: 59886 Message-Id: <201007252356.09847.ebotcazou@adacore.com> To: gcc-patches@gcc.gnu.org We have roughly the same long-standing bug on SPARC64 as on x86-64... Straightforward fix attached but it will require some extensive testing before being installed on the 3 branches like the x86-64 fix. 2010-07-25 Eric Botcazou PR target/44942 * config/sparc/sparc.c (function_arg_advance): Always take into account the padding, if any. Index: config/sparc/sparc.c =================================================================== --- config/sparc/sparc.c (revision 162521) +++ config/sparc/sparc.c (working copy) @@ -5814,9 +5814,8 @@ function_arg_advance (struct sparc_args /* We pass 0 for incoming_p here, it doesn't matter. */ slotno = function_arg_slotno (cum, mode, type, named, 0, ®no, &padding); - /* If register required leading padding, add it. */ - if (slotno != -1) - cum->words += padding; + /* If argument requires leading padding, add it. */ + cum->words += padding; if (TARGET_ARCH32) {