From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17538 invoked by alias); 2 May 2006 12:54:13 -0000 Received: (qmail 15426 invoked by uid 48); 2 May 2006 12:54:08 -0000 Date: Tue, 02 May 2006 12:54:00 -0000 Subject: [Bug target/27386] New: AVR: wrong code generated when passing three uint64_t arguments to function X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "j at uriah dot heep dot sax dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg00141.txt.bz2 List-Id: When passing three uint64_t arguments to a function, AVR-GCC generates completely wrong code. The first two uint64_t arguments are passed in registers, and thus not affected. The caller then allocates 8 bytes on the stack for the fourth argument, but writes to 8 bytes beyond the allocated area (destroying the current function's stack). The callee tries to fetch the values from the locations on the stack where they ought to be (but actually aren't). This bug appears in all tested versions of GCC (3.4.6, 4.1.0, SVN trunk). -- Summary: AVR: wrong code generated when passing three uint64_t arguments to function Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: j at uriah dot heep dot sax dot de GCC build triplet: *-*-* GCC host triplet: *-*-* GCC target triplet: avr-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27386