]> gcc.gnu.org Git - gcc.git/commit - gcc/cp/pt.c
re PR c++/20103 (ICE in create_tmp_var with C99 style struct initializer)
authorMark Mitchell <mark@codesourcery.com>
Thu, 25 May 2006 20:18:26 +0000 (20:18 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 25 May 2006 20:18:26 +0000 (20:18 +0000)
commite92fb50114706dd60fc43ccec488a7ac99b5fa9b
tree622ad082d8859f1f7dcb1eac879fee90193bb6e0
parent05a58ad48d4bad7dff39cc2c2b5263bbb89cab38
re PR c++/20103 (ICE in create_tmp_var with C99 style struct initializer)

PR c++/20103
* gimplify.c (gimplify_decl_expr): Do not call gimple_add_tmp_var
for anonymous variables explicitly declared by front ends.

PR c++/20103
* decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
error_mark_node to indicate an initialization is OK.
(start_decl): Likewise.  Adjust call to start_decl_1.
(start_decl_1): Add initialized parameter.  Simplify.
* except.c (initialize_handler_parm): Adjust call to
setart_decl_1.
(expand_start_catch_block): Let cp_finish_decl initialize catch
parameters.
* cp-tree.h (start_decl_1): Adjust prototype.
* pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
(instantiate_decl): Let cp_finish_decl handle initialization.
* semantics.c (finish_compound_literal): Create a temporary
variable for the literal.
* typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
cases.
* decl2.c (finish_static_data_member_decl): Don't set
DECL_INITIAL.
(grokfield): Do not try to initialize functions.

PR c++/20103
* g++.dg/ext/complit6.C: New test.
* g++.dg/ext/complit3.C: Adjust error markers.
* g++.dg/init/const3.C: New test.

From-SVN: r114119
14 files changed:
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/except.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/typeck.c
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/complit3.C
gcc/testsuite/g++.dg/ext/complit6.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/const3.C [new file with mode: 0644]
This page took 0.062045 seconds and 5 git commands to generate.