This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] for PR 17531
Hello,
> > it is wrapped in NOP_EXPR. NOP_EXPR is dropped in expander.
>
> Very enlightening.
I was a bit in a hurry, but still I think I answered the question I got.
Sorry, I cannot read your mind...
> Specifically, I asked why the convert_to_mode around expr.c:7309
> isn't taking care of this. Adding another convert_to_mode to
> work around this one not working is dumb.
Not really. expand_binop does not assume that its operands have the
same type as result, so the patch would be a proper fix for the function
anyway.
As for your question: the expression in question looks like
(short int) &something.field
expr.c:7292 asks for &something.field in HImode, and this expansion
is the one that aborts. The line you ask for is not reached.
Zdenek