From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11356 invoked by alias); 13 Jun 2005 05:42:03 -0000 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 Received: (qmail 10884 invoked by uid 48); 13 Jun 2005 05:41:58 -0000 Date: Mon, 13 Jun 2005 05:42:00 -0000 Message-ID: <20050613054158.10883.qmail@sourceware.org> From: "lyuzhou at 21cn dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050611144331.22017.lyuzhou@21cn.com> References: <20050611144331.22017.lyuzhou@21cn.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/22017] [3.4/4.0/4.1 Regression] Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags X-Bugzilla-Reason: CC X-SW-Source: 2005-06/txt/msg01718.txt.bz2 List-Id: ------- Additional Comments From lyuzhou at 21cn dot com 2005-06-13 05:41 ------- I just apply your patch to mingw gcc 3.4.4. But it seems failed too. (In reply to comment #3) > Hi, > This is what is says in the comments above i386/i386.c: > ix86_return_pop_args: > FUNDECL is the declaration node of the function (as a tree), > FUNTYPE is the data type of the function (as a tree), > or for a library call it is an identifier node for the subroutine name. > and indeed , the call to build_decl in init_block_move_fn in expr.c > (where the call to "mmecpy" is generated) has an identifier node as the > second arg. > There appears to be a long-standing thinko in the test for library calls > in ix86_return_pops_args. > This patch fixes the memcpy call in the testcase on trunk. I'll do a > bootstrap and regetest overnight. Could you test on 3.4 branch please. > * config/i386/i386 (ix86_return_pops_args): Test the function > type, not the decl node, when testing for library call. > Index: i386.c > =================================================================== > RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v > retrieving revision 1.829 > diff -c -3 -p -r1.829 i386.c > *************** ix86_eax_live_at_start_p (void) > *** 1943,1949 **** > int > ix86_return_pops_args (tree fundecl, tree funtype, int size) > { > ! int rtd = TARGET_RTD && (!fundecl || TREE_CODE (fundecl) != > IDENTIFIER_NODE); > > /* Cdecl functions override -mrtd, and never pop the stack. */ > if (! lookup_attribute ("cdecl", TYPE_ATTRIBUTES (funtype))) { > --- 1943,1949 ---- > int > ix86_return_pops_args (tree fundecl, tree funtype, int size) > { > ! int rtd = TARGET_RTD && (!funtype || TREE_CODE (funtype) != > IDENTIFIER_NODE); > > /* Cdecl functions override -mrtd, and never pop the stack. */ > if (! lookup_attribute ("cdecl", TYPE_ATTRIBUTES (funtype))) { -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017