This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR middle-end/17793
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: ebotcazou at libertysurf dot fr
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 20 Oct 04 09:51:08 EDT
- Subject: Re: [PATCH] Fix PR middle-end/17793
What can I say except "please read the patch"? It turns
ADDR_EXPR <pointer_type <record_type>>
VIEW_CONVERT_EXPR <record_type>
NOP_EXPR <integer_type1>
ARRAY_REF <integer_type2>
into
NOP_EXPR <pointer_type <record_type>
NOP_EXPR <pointer_type <integer_type1>
ADDR_EXPR <pointer_type <integer_type2>>
ARRAY_REF <integer_type2>
I don't ever recall seeing the nest like that and I don't understand
why it has to be handled separately.
I'd expect that original to be first transformed to:
NOP_EXPR <pointer_type <record_type>>
ADDR_EXPR <pointer_type <integer_type1>>
NOP_EXPR <integer_type1>
ARRAY_REF <integer_type2>
Then we'd go back and process the ADDR_EXPR again and do the same
thing (if valid, meaning if the size isn't changing or it is and the
endianness is right). But you don't need to look inside the
VIEW_CONVERT_EXPR to do that.
Moreover, you don't need the two NOP_EXPRs in the result: one is enough.