public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58607] New: [4.9 Regression] ICE with undeclared variable in constexpr
@ 2013-10-03 20:49 reichelt at gcc dot gnu.org
2013-10-10 11:40 ` [Bug c++/58607] [4.9 Regression] [c++11] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-03 20:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58607
Bug ID: 58607
Summary: [4.9 Regression] ICE with undeclared variable in
constexpr
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following invalid code snippet (compiled with "-std=c++11") triggers an ICE
on trunk (GCC 4.9.0 20130920):
=========================
struct A
{
constexpr A() { i; }
};
=========================
bug.cc: In constructor 'constexpr A::A()':
bug.cc:3:19: error: 'i' was not declared in this scope
constexpr A() { i; }
^
bug.cc:3:22: internal compiler error: in build_data_member_initialization, at
cp/semantics.c:6032
constexpr A() { i; }
^
0x6c177e build_data_member_initialization
../../gcc/gcc/cp/semantics.c:6032
0x6c1cc9 build_constexpr_constructor_member_initializers
../../gcc/gcc/cp/semantics.c:6209
0x6c1cc9 massage_constexpr_body
../../gcc/gcc/cp/semantics.c:6290
0x6c94f3 register_constexpr_fundef(tree_node*, tree_node*)
../../gcc/gcc/cp/semantics.c:6394
0x568058 maybe_save_function_definition
../../gcc/gcc/cp/decl.c:13771
0x568058 finish_function(int)
../../gcc/gcc/cp/decl.c:13892
0x65090d cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:22346
0x635fbc cp_parser_late_parsing_for_member
../../gcc/gcc/cp/parser.c:22995
0x635fbc cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:19078
0x638180 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:19102
0x638180 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14081
0x64d679 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11328
0x651719 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10918
0x653740 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10867
0x65c76e cp_parser_declaration
../../gcc/gcc/cp/parser.c:10764
0x65b4da cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10650
0x65cda6 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:3939
0x65cda6 c_parse_file()
../../gcc/gcc/cp/parser.c:28900
0x7707e3 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58607] [4.9 Regression] [c++11] ICE with undeclared variable in constexpr
2013-10-03 20:49 [Bug c++/58607] New: [4.9 Regression] ICE with undeclared variable in constexpr reichelt at gcc dot gnu.org
@ 2013-10-10 11:40 ` rguenth at gcc dot gnu.org
2013-10-23 0:19 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-10-10 11:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58607
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58607] [4.9 Regression] [c++11] ICE with undeclared variable in constexpr
2013-10-03 20:49 [Bug c++/58607] New: [4.9 Regression] ICE with undeclared variable in constexpr reichelt at gcc dot gnu.org
2013-10-10 11:40 ` [Bug c++/58607] [4.9 Regression] [c++11] " rguenth at gcc dot gnu.org
@ 2013-10-23 0:19 ` paolo.carlini at oracle dot com
2013-11-05 14:47 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-23 0:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58607
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-10-23
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
Ever confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Pending patch here: http://gcc.gnu.org/ml/gcc-patches/2013-10/msg01566.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58607] [4.9 Regression] [c++11] ICE with undeclared variable in constexpr
2013-10-03 20:49 [Bug c++/58607] New: [4.9 Regression] ICE with undeclared variable in constexpr reichelt at gcc dot gnu.org
2013-10-10 11:40 ` [Bug c++/58607] [4.9 Regression] [c++11] " rguenth at gcc dot gnu.org
2013-10-23 0:19 ` paolo.carlini at oracle dot com
@ 2013-11-05 14:47 ` rguenth at gcc dot gnu.org
2013-11-25 20:52 ` paolo at gcc dot gnu.org
2013-11-25 20:53 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-05 14:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58607
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58607] [4.9 Regression] [c++11] ICE with undeclared variable in constexpr
2013-10-03 20:49 [Bug c++/58607] New: [4.9 Regression] ICE with undeclared variable in constexpr reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2013-11-05 14:47 ` rguenth at gcc dot gnu.org
@ 2013-11-25 20:52 ` paolo at gcc dot gnu.org
2013-11-25 20:53 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-11-25 20:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58607
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Mon Nov 25 20:51:56 2013
New Revision: 205364
URL: http://gcc.gnu.org/viewcvs?rev=205364&root=gcc&view=rev
Log:
/cp
2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58607
* semantics.c (check_constexpr_ctor_body): Check for BIND_EXPR_VARS.
/testsuite
2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58607
* g++.dg/cpp0x/constexpr-ice9.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ice9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58607] [4.9 Regression] [c++11] ICE with undeclared variable in constexpr
2013-10-03 20:49 [Bug c++/58607] New: [4.9 Regression] ICE with undeclared variable in constexpr reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2013-11-25 20:52 ` paolo at gcc dot gnu.org
@ 2013-11-25 20:53 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-25 20:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58607
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Assignee|paolo.carlini at oracle dot com |unassigned at gcc dot gnu.org
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-25 20:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-03 20:49 [Bug c++/58607] New: [4.9 Regression] ICE with undeclared variable in constexpr reichelt at gcc dot gnu.org
2013-10-10 11:40 ` [Bug c++/58607] [4.9 Regression] [c++11] " rguenth at gcc dot gnu.org
2013-10-23 0:19 ` paolo.carlini at oracle dot com
2013-11-05 14:47 ` rguenth at gcc dot gnu.org
2013-11-25 20:52 ` paolo at gcc dot gnu.org
2013-11-25 20:53 ` paolo.carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).