This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use of compound_literal_expr in c vs target_expr in c++ for compound literals



On Jul 24, 2006, at 3:07 PM, Andrew Pinski wrote:




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.

Yes, looks like is similar to my problem.


- Thanks, Fariborz


Thanks, Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]