public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/41355] Type of ADDR_EXPR in CALL_EXPR not rebuilt when function is cloned
Date: Mon, 05 Jul 2010 19:02:00 -0000 [thread overview]
Message-ID: <20100705190211.23655.qmail@sourceware.org> (raw)
In-Reply-To: <bug-41355-8622@http.gcc.gnu.org/bugzilla/>
------- Comment #2 from hubicka at ucw dot cz 2010-07-05 19:02 -------
Subject: Re: Type of ADDR_EXPR in CALL_EXPR
not rebuilt when function is cloned
> It turns out that the problem is that when build_function_type_skip_args
> creates
> the new type, TYPE_POINTER_TO for the new type is still pointing to the old
> type.
> When gimple_call_set_fndecl is used to change the fndecl to one with less
> arguments, an ADDR_EXPR is built. The type of the ADDR_EXPR is obtained from
> the
> TYPE_POINTER_TO field of the new type, and thus has type pointer-to-old-type
> rather than pointer-to-new-type. I'm testing the following patch. The idea
> here is that calling copy_node has no advantage. In spite of the comment,
The conditional you removed is about case where METHOD_TYPE is passed and
"this" pointer
is not removed. In this case we still want to produce METHOD_TYPE just with
args
adjusted. I think this functionality should be preserved.
Are attributes attached to decl (not type) also copied?
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41355
next prev parent reply other threads:[~2010-07-05 19:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-14 16:38 [Bug tree-optimization/41355] New: " baldrick at free dot fr
2010-07-05 18:44 ` [Bug tree-optimization/41355] " baldrick at gcc dot gnu dot org
2010-07-05 19:02 ` hubicka at ucw dot cz [this message]
2010-07-05 19:14 ` baldrick at gcc dot gnu dot org
2010-07-05 19:19 ` hubicka at ucw dot cz
2010-07-06 8:23 ` baldrick at gcc dot gnu dot org
2010-07-07 15:25 ` baldrick at gcc dot gnu dot org
2010-07-07 21:24 ` ebotcazou at gcc dot gnu dot org
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=20100705190211.23655.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).