This is the mail archive of the gcc-bugs@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]

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


------- Additional Comments From giovannibajo at libero dot it  2005-03-07 08:51 -------
(In reply to comment #15)

> +    case TARGET_EXPR:
> +      {
> +	tree r = tsubst_copy (t, args, complain, in_decl);
> +
> +	TREE_TYPE (r) = RECUR (TREE_TYPE (t));
> +	TARGET_EXPR_SLOT (r) = RECUR (TARGET_EXPR_SLOT (t));
> +	TARGET_EXPR_INITIAL (r) = RECUR (TARGET_EXPR_INITIAL (t));
> +	TARGET_EXPR_CLEANUP (r) = RECUR (TARGET_EXPR_CLEANUP (t));
> +
> +	if (TREE_TYPE (TARGET_EXPR_SLOT (t))
> +	    == TREE_TYPE (TARGET_EXPR_INITIAL (t)))
> +	  TREE_TYPE (TARGET_EXPR_SLOT (r)) =
> +	    TREE_TYPE (TARGET_EXPR_INITIAL (r));
> +
> +	if (TREE_TYPE (t) == TREE_TYPE (TARGET_EXPR_SLOT (t)))
> +	  TREE_TYPE (r) = TREE_TYPE (TARGET_EXPR_SLOT (r));
> +
> +	return r;
> +      }
> +

Can you add a comment that TARGET_EXPR is being used to represent C99 compound 
literals?


-- 


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


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