public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58610] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor
@ 2013-10-03 21:29 reichelt at gcc dot gnu.org
2013-10-10 11:39 ` [Bug c++/58610] " 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 21:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58610
Bug ID: 58610
Summary: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of
class with template constructor
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
since GCC 4.7.0:
=============================
struct A
{
template<typename> A();
};
constexpr A a;
=============================
bug.cc:6:13: error: the type 'const A' of constexpr variable 'a' is not literal
constexpr A a;
^
bug.cc:1:8: note: 'A' is not literal because:
struct A
^
bug.cc:1:8: note: 'A' is not an aggregate, does not have a trivial default
constructor, and has no constexpr constructor that is not a copy or move
constructor
bug.cc:6:13: internal compiler error: tree check: expected function_decl, have
template_decl in explain_non_literal_class, at cp/class.c:5327
constexpr A a;
^
0xcd83ea tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9176
0x5f099c tree_check
../../gcc/gcc/tree.h:2609
0x5f099c explain_non_literal_class(tree_node*)
../../gcc/gcc/cp/class.c:5327
0x6bf46b ensure_literal_type_for_constexpr_object(tree_node*)
../../gcc/gcc/cp/semantics.c:5814
0x5696fb cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/gcc/cp/decl.c:6157
0x65119f cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16568
0x6518bf cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10986
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++/58610] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor
2013-10-03 21:29 [Bug c++/58610] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor reichelt at gcc dot gnu.org
@ 2013-10-10 11:39 ` rguenth at gcc dot gnu.org
2014-02-27 17:56 ` 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:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58610
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
Target Milestone|--- |4.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58610] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor
2013-10-03 21:29 [Bug c++/58610] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor reichelt at gcc dot gnu.org
2013-10-10 11:39 ` [Bug c++/58610] " rguenth at gcc dot gnu.org
@ 2014-02-27 17:56 ` paolo.carlini at oracle dot com
2014-02-27 18:36 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-02-27 17:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58610
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-02-27
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58610] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor
2013-10-03 21:29 [Bug c++/58610] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor reichelt at gcc dot gnu.org
2013-10-10 11:39 ` [Bug c++/58610] " rguenth at gcc dot gnu.org
2014-02-27 17:56 ` paolo.carlini at oracle dot com
@ 2014-02-27 18:36 ` paolo.carlini at oracle dot com
2014-02-28 20:20 ` paolo at gcc dot gnu.org
2014-02-28 20:21 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-02-27 18:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58610
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58610] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor
2013-10-03 21:29 [Bug c++/58610] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-02-27 18:36 ` paolo.carlini at oracle dot com
@ 2014-02-28 20:20 ` paolo at gcc dot gnu.org
2014-02-28 20:21 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-02-28 20:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58610
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Fri Feb 28 20:20:21 2014
New Revision: 208226
URL: http://gcc.gnu.org/viewcvs?rev=208226&root=gcc&view=rev
Log:
/cp
2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58610
* cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
* call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
* lambda.c (maybe_add_lambda_conv_op): Likewise.
/testsuite
2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58610
* g++.dg/cpp0x/constexpr-ice11.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ice11.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/lambda.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58610] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor
2013-10-03 21:29 [Bug c++/58610] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-02-28 20:20 ` paolo at gcc dot gnu.org
@ 2014-02-28 20:21 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-02-28 20:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58610
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
Target Milestone|4.7.4 |4.9.0
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-28 20:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-03 21:29 [Bug c++/58610] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr of class with template constructor reichelt at gcc dot gnu.org
2013-10-10 11:39 ` [Bug c++/58610] " rguenth at gcc dot gnu.org
2014-02-27 17:56 ` paolo.carlini at oracle dot com
2014-02-27 18:36 ` paolo.carlini at oracle dot com
2014-02-28 20:20 ` paolo at gcc dot gnu.org
2014-02-28 20:21 ` 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).