public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lyuzhou at 21cn dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@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
Date: Mon, 13 Jun 2005 05:42:00 -0000 [thread overview]
Message-ID: <20050613054158.10883.qmail@sourceware.org> (raw)
In-Reply-To: <20050611144331.22017.lyuzhou@21cn.com>
------- 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
next prev parent reply other threads:[~2005-06-13 5:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-11 14:43 [Bug c/22017] New: " lyuzhou at 21cn dot com
2005-06-11 14:52 ` [Bug c/22017] " lyuzhou at 21cn dot com
2005-06-11 14:54 ` [Bug target/22017] " pinskia at gcc dot gnu dot org
2005-06-12 5:18 ` dannysmith at users dot sourceforge dot net
2005-06-12 9:40 ` dannysmith at users dot sourceforge dot net
2005-06-12 15:07 ` pinskia at gcc dot gnu dot org
2005-06-12 15:08 ` [Bug target/22017] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-13 5:42 ` lyuzhou at 21cn dot com [this message]
2005-07-06 17:03 ` mmitchel at gcc dot gnu dot org
2005-09-27 16:02 ` mmitchel at gcc dot gnu dot org
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
2005-10-22 21:52 ` pinskia at gcc dot gnu dot org
2005-10-31 3:45 ` mmitchel at gcc dot gnu dot org
2005-10-31 4:30 ` dannysmith at users dot sourceforge dot net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050613054158.10883.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).