I have verified that this patch http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01333.html causes bug 31666 and bug 31681.
A patch is posted at http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01223.html
Subject: Bug 31989 Author: hjl Date: Fri May 18 21:35:12 2007 New Revision: 124835 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124835 Log: 2007-05-18 H.J. Lu <hongjiu.lu@intel.com> PR target/31989 PR target/31681 PR target/31666 * config/i386/i386.c (init_cumulative_args): Set maybe_vaarg to true if function has no argument. Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c
Fixed.