zero sized initializers with side effects discarded
Andrew Pinski
pinskia@physics.uc.edu
Fri Sep 9 21:24:00 GMT 2005
On Sep 9, 2005, at 4:40 PM, Olivier Hainque wrote:
> Olivier Hainque wrote:
>> I'm not yet clear why the call is not issued there. This is my first
>> dive in the gimplifier, so it might well be simple.
>
> FWIW, I think part of the problem is that TREE_SIDE_EFFECTS is not
> set on the constructor, despite the presence of a function call in
> the components.
No, that is not the problem. The problem is that we gimplify the
expression for side effects but don't actually add the expression
if the gimplify put it back in the same expression.
Any ways, the following patch fixes the issue correctly.
If you could test and post the patch, that would be nice?
Thanks,
Andrew Pinski
ChangeLog:
* gimplify.c (gimplify_expr) <case CONSTRUCTOR>: Add the
expressions to a statement list instead of gimplifying them.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t1.diff.txt
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20050909/78a12306/attachment.txt>
-------------- next part --------------
More information about the Gcc
mailing list