From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4662 invoked by alias); 3 Jun 2009 03:35:44 -0000 Received: (qmail 4653 invoked by uid 22791); 3 Jun 2009 03:35:44 -0000 X-SWARE-Spam-Status: No, hits=-51.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Jun 2009 03:35:38 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n533ZZp4008338 for ; Tue, 2 Jun 2009 23:35:35 -0400 Received: from greed.delorie.com (vpn-12-108.rdu.redhat.com [10.11.12.108]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n533ZZCI005361 for ; Tue, 2 Jun 2009 23:35:35 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1] (may be forged)) by greed.delorie.com (8.14.3/8.14.3) with ESMTP id n533ZZrV031279 for ; Tue, 2 Jun 2009 23:35:35 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.3/8.14.3/Submit) id n533ZZJ6031276; Tue, 2 Jun 2009 23:35:35 -0400 Date: Wed, 03 Jun 2009 03:35:00 -0000 Message-Id: <200906030335.n533ZZJ6031276@greed.delorie.com> From: DJ Delorie To: gcc@gcc.gnu.org Subject: question about TARGET_MUST_PASS_IN_STACK X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00030.txt.bz2 On xstormy16, when structures with variable-length arrays are passed to functions (execute/20020412-1.c), it appears that they're passed by reference (based on examining the stack), despite the port not explicitly requesting that. This causes a mis-match in the va_arg code, which assumes the array is passed by value, just pushed to the stack portion of the argument list. Which interpretation of these macros is correct? (based on that, I'll debug further) Xstormy16 uses the default TARGET_MUST_PASS_IN_STACK, which returns true only for variable-length arrays, and uses the default TARGET_PASS_BY_REFERENCE, which always returns false.