From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9716 invoked by alias); 15 Jul 2010 02:39:49 -0000 Received: (qmail 9648 invoked by uid 48); 15 Jul 2010 02:39:29 -0000 Date: Thu, 15 Jul 2010 02:39:00 -0000 Subject: [Bug c/44942] New: Bug in argument passing of long double X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pdox at alum dot mit dot edu" 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/msg01526.txt.bz2 On X86-64, the following code demonstrates how passing a long double as a fixed argument causes corruption of the following variable arguments. #include #include #include void test(int a, int b, int c, int d, int e, int f, int g, long double h, ...) { int i; va_list ap; va_start(ap, h); i = va_arg(ap, int); printf("Got %d, expected %d\n", i, 123456789); va_end(ap); } int main() { test(0, 0, 0, 0, 0, 0, 0, (long double)0.0, (int)123456789); return 0; } -- Summary: Bug in argument passing of long double Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pdox at alum dot mit dot edu GCC build triplet: x86_64-linux-gnu GCC host triplet: x86_64-linux-gnu GCC target triplet: x86_64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44942