> 
> 
> gcc generates two separate trees for compound literals in c and c++.  
> As in this test case:
> 
> struct S {
>          int i,j;
> };
> void foo (struct S);
> 
> int main ()
> {
>          foo((struct S){1,1});
> }

>      On the other hand, such a guard does not exist for a  
> compound_literal_expr and when gimple_add_tmp_var is called, it  
> asserts. So, I added check for
>      !DECL_SEEN_IN_BIND_EXPR_P (decl) in  
> gimplify_compound_literal_expr before call to gimple_add_tmp_var is  
> made. As in the following diff:

I think you are trying to fix PR 28418 which is an ICE in gimple_add_tmp_var 
with
compound literals in C.

Thanks,
Andrew Pinski

Reply via email to