public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60389] [4.8/4,9 Regression] [c++11] ICE with inheriting constructors and wrong usage of constexpr
2014-03-02 21:06 [Bug c++/60389] New: [4.8/4,9 Regression] ICE with inheriting constructors and wrong usage of constexpr reichelt at gcc dot gnu.org
@ 2014-03-02 21:06 ` reichelt at gcc dot gnu.org
2014-03-03 9:01 ` [Bug c++/60389] [4.8/4.9 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-02 21:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60389
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.7.0
Target Milestone|--- |4.8.3
Summary|[4.8/4,9 Regression] ICE |[4.8/4,9 Regression]
|with inheriting |[c++11] ICE with inheriting
|constructors and wrong |constructors and wrong
|usage of constexpr |usage of constexpr
Known to fail| |4.8.0, 4.9.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60389] New: [4.8/4,9 Regression] ICE with inheriting constructors and wrong usage of constexpr
@ 2014-03-02 21:06 reichelt at gcc dot gnu.org
2014-03-02 21:06 ` [Bug c++/60389] [4.8/4,9 Regression] [c++11] " reichelt at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-02 21:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60389
Bug ID: 60389
Summary: [4.8/4,9 Regression] ICE with inheriting constructors
and wrong usage of constexpr
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
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.8.0:
===========================================
struct A
{
template<typename...T> A(T...) {}
};
struct B : A
{
using A::A;
};
constexpr B b;
===========================================
bug.cc:11:13: error: the type 'const B' of constexpr variable 'b' is not
literal
constexpr B b;
^
bug.cc:6:8: note: 'B' is not literal because:
struct B : A
^
bug.cc:6:8: note: 'B' 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:8:12: note: 'template<class ... T> B::B(T ...)' is not usable as a
constexpr function because:
using A::A;
^
bug.cc:8:12: internal compiler error: tree check: expected function_decl, have
template_decl in is_valid_constexpr_fn, at cp/semantics.c:7434
0xdc0f54 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9192
0x73e7f7 tree_check
../../gcc/gcc/tree.h:2709
0x73e7f7 is_valid_constexpr_fn
../../gcc/gcc/cp/semantics.c:7434
0x742fd0 explain_invalid_constexpr_fn(tree_node*)
../../gcc/gcc/cp/semantics.c:8019
0x73f4f2 ensure_literal_type_for_constexpr_object(tree_node*)
../../gcc/gcc/cp/semantics.c:7374
0x5dcddf cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
../../gcc/gcc/cp/decl.c:6206
0x6ce58d cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:16819
0x6cfd49 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:11205
0x6b3003 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:11086
0x6da2d2 cp_parser_declaration
../../gcc/gcc/cp/parser.c:10983
0x6d8fc8 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10869
0x6da87a cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4014
0x6da87a c_parse_file()
../../gcc/gcc/cp/parser.c:31590
0x7fa103 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60389] [4.8/4.9 Regression] [c++11] ICE with inheriting constructors and wrong usage of constexpr
2014-03-02 21:06 [Bug c++/60389] New: [4.8/4,9 Regression] ICE with inheriting constructors and wrong usage of constexpr reichelt at gcc dot gnu.org
2014-03-02 21:06 ` [Bug c++/60389] [4.8/4,9 Regression] [c++11] " reichelt at gcc dot gnu.org
@ 2014-03-03 9:01 ` rguenth at gcc dot gnu.org
2014-03-04 11:05 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-03 9:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60389
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |error-recovery
Priority|P3 |P5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60389] [4.8/4.9 Regression] [c++11] ICE with inheriting constructors and wrong usage of constexpr
2014-03-02 21:06 [Bug c++/60389] New: [4.8/4,9 Regression] ICE with inheriting constructors and wrong usage of constexpr reichelt at gcc dot gnu.org
2014-03-02 21:06 ` [Bug c++/60389] [4.8/4,9 Regression] [c++11] " reichelt at gcc dot gnu.org
2014-03-03 9:01 ` [Bug c++/60389] [4.8/4.9 " rguenth at gcc dot gnu.org
@ 2014-03-04 11:05 ` paolo.carlini at oracle dot com
2014-03-11 17:35 ` paolo at gcc dot gnu.org
2014-03-11 17:36 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-04 11:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60389
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-03-04
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> ---
Maybe just a STRIP_TEMPLATE issue.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60389] [4.8/4.9 Regression] [c++11] ICE with inheriting constructors and wrong usage of constexpr
2014-03-02 21:06 [Bug c++/60389] New: [4.8/4,9 Regression] ICE with inheriting constructors and wrong usage of constexpr reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-03-04 11:05 ` paolo.carlini at oracle dot com
@ 2014-03-11 17:35 ` paolo at gcc dot gnu.org
2014-03-11 17:36 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-03-11 17:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60389
--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Tue Mar 11 17:34:32 2014
New Revision: 208491
URL: http://gcc.gnu.org/viewcvs?rev=208491&root=gcc&view=rev
Log:
/cp
2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60389
* method.c (get_inherited_ctor): New.
* cp-tree.h (get_inherited_ctor): Declare it.
* semantics.c (is_valid_constexpr_fn): Use it.
/testsuite
2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60389
* g++.dg/cpp0x/inh-ctor19.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/method.c
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60389] [4.8/4.9 Regression] [c++11] ICE with inheriting constructors and wrong usage of constexpr
2014-03-02 21:06 [Bug c++/60389] New: [4.8/4,9 Regression] ICE with inheriting constructors and wrong usage of constexpr reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-03-11 17:35 ` paolo at gcc dot gnu.org
@ 2014-03-11 17:36 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-11 17:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60389
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.8.3 |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-03-11 17:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-02 21:06 [Bug c++/60389] New: [4.8/4,9 Regression] ICE with inheriting constructors and wrong usage of constexpr reichelt at gcc dot gnu.org
2014-03-02 21:06 ` [Bug c++/60389] [4.8/4,9 Regression] [c++11] " reichelt at gcc dot gnu.org
2014-03-03 9:01 ` [Bug c++/60389] [4.8/4.9 " rguenth at gcc dot gnu.org
2014-03-04 11:05 ` paolo.carlini at oracle dot com
2014-03-11 17:35 ` paolo at gcc dot gnu.org
2014-03-11 17:36 ` 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).