From: Jan Hubicka <jh@suse.cz>
To: Richard Henderson <rth@redhat.com>, Jan Hubicka <jh@suse.cz>,
Jan Hubicka <hubicka@ucw.cz>,
gcc@gcc.gnu.org, law@redhat.com, Jason Merrill <jason@redhat.com>
Subject: Re: tree-SSA and indirect references.
Date: Tue, 20 Jan 2004 14:25:00 -0000 [thread overview]
Message-ID: <20040120142517.GL7878@kam.mff.cuni.cz> (raw)
In-Reply-To: <20040120102113.GA5204@redhat.com>
> On Tue, Jan 20, 2004 at 10:50:13AM +0100, Jan Hubicka wrote:
> > > On Tue, Jan 20, 2004 at 01:31:56AM +0100, Jan Hubicka wrote:
> > > > vara=(type *)&varb;
> > > > varc=*vara;
> >
> > In the case of Gerald's testcase these are different classes inherited
> > from each other.
>
> Would you please be concrete, draw the diagram and show the members?
>
> My guess is that the best way to fix this is to change how the C++
> front end implements inheritence.
>
> At present, as you can see, the front end takes the address of the
> base, casts, and then dereferences. From the point of view of GIMPLE,
> it would be much better to have this appear to be nested structures.
> (The only exception will be for virtual bases, but I can see from the
> above that that is not at issue for this test case.)
>
> I have no idea how easy or difficult such a change might be. Jason
> or Mark, perhaps you could comment?
Actually the casts don't have to be very complex. See for instance:
<D175450>_4 = (short unsigned int * const *)&__first;
T.14797_7 = *<D175450>_4;
<D175454>_9 = (short unsigned int * const *)&__last;
T.14799_12 = *<D175454>_9;
these two are operands of template:
void std::fill(_ForwardIter, _ForwardIter, const _Tp&) [with _ForwardIter = __gnu_cxx::__normal_iterator<short unsigned int*,
std::vector<short unsigned int, std::allocator<short unsigned int> > >, _Tp = short unsigned int] (__first, __last, __value)
so if I read it right, they shall differ only in constantness.
The other cass I saw were just same case of instantiation of template to
aggregate I think.
Honza
>
>
> r~
next prev parent reply other threads:[~2004-01-20 14:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-20 0:31 Jan Hubicka
2004-01-20 0:59 ` Richard Henderson
2004-01-20 9:50 ` Jan Hubicka
2004-01-20 10:21 ` Richard Henderson
2004-01-20 14:25 ` Jan Hubicka [this message]
2004-01-20 16:57 ` Andrew Pinski
2004-01-20 18:15 ` Richard Henderson
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=20040120142517.GL7878@kam.mff.cuni.cz \
--to=jh@suse.cz \
--cc=gcc@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=jason@redhat.com \
--cc=law@redhat.com \
--cc=rth@redhat.com \
/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).