[Bug c++/20103] [4.0/4.1 regression] ICE in create_tmp_var with C99 style struct initializer

aoliva at redhat dot com gcc-bugzilla@gcc.gnu.org
Sat Apr 2 17:27:00 GMT 2005


------- Additional Comments From aoliva at gcc dot gnu dot org  2005-04-02 17:27 -------
Subject: Re: [PR c++/20103] failure to gimplify constructors for addressable types

On Mar 18, 2005, Alexandre Oliva <aoliva@redhat.com> wrote:

> Index: gcc/ChangeLog
> from  Alexandre Oliva  <aoliva@redhat.com>

> 	PR c++/20103
> 	* gimplify.c (gimplify_decl_expr): Add temp variable to binding
> 	before gimplifying its initializer.
> 	* c-gimplify.c (gimplify_compound_literal_expr): After replacing
> 	the expr with a decl, we're all done.

> Index: gcc/cp/ChangeLog
> from  Alexandre Oliva  <aoliva@redhat.com>

> 	PR c++/20103
> 	* cp-tree.h (build_compound_literal): Declare.
> 	* semantics.c (finish_compound_literal): Move most of the code...
> 	* tree.c (build_compound_literal): ... here.  New function.
> 	(lvalue_p_1): Handle COMPOUND_LITERAL_EXPR.
> 	(stabilize_init): Likewise.
> 	* pt.c (tsubst_copy_and_build): Likewise.
> 	* call.c (build_over_call): Likewise.
> 	* class.c (fixed_type_or_null): Likewise.
> 	* cp-gimplify.c (cp_gimplify_init_expr): Likewise.
> 	(cp_gimplify_compound_literal_expr): New.
> 	(cp_gimplify_expr): Use it.
> 	* cvt.c (force_rvalue, ocp_convert): Handle COMPOUND_LITERAL_EXPR.
> 	* typeck.c (build_x_unary_op): Likewise.
> 	(cxx_mark_addressable): Likewise.
> 	(maybe_warn_about_returning_address_of_local): Likewise.

Ping?

http://gcc.gnu.org/PR20103



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20103



More information about the Gcc-bugs mailing list