This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] for PR 18040
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: zack at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 17 Oct 04 17:26:06 EDT
- Subject: Re: [patch] for PR 18040
What he's saying is that
<COMPONENT_REF type struct field>
(and all other reference nodes) would implicitly convert FIELD to TYPE,
if that's not FIELD's intrinsic type. I think this makes a hell of a
lot of sense, personally.
... actually, it's not good enough because it doesn't handle the
((cast) var).field
case and that's an expensive one. If we don't have a way of representing
that, we might have to do a full copy of VAR, which might be quite large.
It's been suggested that an optimizer can remove that copy, but how could it?
There's no way of representing having the copy be removed in the tree! Only
an RTL optimizer could remove it and that's way too low level.