[Bug c++/11547] [3.4 regression] ICE with const temporaries
cvs-commit at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jul 17 04:31:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11547
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-07-17 04:31 -------
Subject: Bug 11547
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2003-07-17 04:31:42
Modified files:
gcc/cp : ChangeLog cp-tree.h decl.c parser.c pt.c
semantics.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/parse: constant3.C crash7.C
Log message:
PR c++/11547
* cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
macro.
(DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
* decl.c (duplicate_decls): Merge
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
* parser.c (cp_parser_postfix_expression): Adjust call to
cp_parser_initializer_list and
cp_parser_parenthesized_expression_list.
(cp_parser_parenthesized_expression_list): Add non_constant_p.
(cp_parser_new_placement): Adjust call to
cp_parser_parenthesized_expression_list.
(cp_parser_direct_new_declarator): Likewise.
(cp_parser_conditional_expression): Remove.
(cp_parser_constant_expression): Parse an assignment-expression,
not a conditional-expression.
(cp_parser_simple_declaration): Resolve expression/declaration
ambiguity more quickly.
(cp_parser_mem_initializer): Adjust call to
cp_parser_parenthesized_expression_list.
(cp_parser_init_declarator): Keep track of whether or not the
initializer is a constant-expression.
(cp_parser_initializer): Add non_constant_p parameter.
(cp_parser_initializer_clause): Likewise.
(cp_parser_initializer_list): Likewise.
(cp_parser_attribute_list): Adjust call to
cp_parser_parenthesized_expression_list.
(cp_parser_functional_cast): Likewise.
* pt.c (tsubst_decl): Copy
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
(tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
* semantics.c (finish_id_expression): Use
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
PR c++/11547
* g++.dg/parse/constant3.C: New test.
* g++.dg/parse/crash7.C: Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3530&r2=1.3531
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.879&r2=1.880
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1091&r2=1.1092
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.84&r2=1.85
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.729&r2=1.730
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.328&r2=1.329
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2887&r2=1.2888
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/constant3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
More information about the Gcc-bugs
mailing list