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

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Mon Mar 7 08:51:00 GMT 2005


------- 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



More information about the Gcc-bugs mailing list