From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13784 invoked by alias); 15 Jul 2010 09:50:22 -0000 Received: (qmail 13257 invoked by uid 48); 15 Jul 2010 09:49:27 -0000 Date: Thu, 15 Jul 2010 09:50:00 -0000 Message-ID: <20100715094927.13256.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/44942] Bug in argument passing of long double In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg01558.txt.bz2 ------- Comment #2 from jakub at gcc dot gnu dot org 2010-07-15 09:49 ------- Seems ix86_function_arg_advance ignores padding for > 8 byte aligned arguments when updating cum->words. With: #include long double test (int a, int b, int c, int d, int e, int f, int g, int g2, int g3, long double h, int g4, long double h2, int g5, long double h3, ...) { int i; va_list ap; va_start (ap, h3); i = va_arg (ap, int); __builtin_printf ("Got %d, expected %d\n", i, 123456789); va_end (ap); return h + h2 + h3 + g3 + g4 + g5; } int main () { test (0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0L, 0, 0.0L, 0, 0.0L, 123456789, 0xaaaaaaaaaaaaaaaaULL, 0x5555555555555555ULL); return 0; } testcase the reading of the va_arg is already off by 24 bytes (3 times 8 byte padding before each of the long double arguments). Looking into it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44942