public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59268] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function
@ 2013-11-23 23:07 reichelt at gcc dot gnu.org
2013-11-25 9:16 ` [Bug c++/59268] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-23 23:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59268
Bug ID: 59268
Summary: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in
a virtual function
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 valid code snippet (compiled with "-std=c++11" or "-std=c++0x"
for older compilers) triggers an ICE since GCC 4.6.1:
===================================
template<typename> struct A
{
constexpr A(int) {}
virtual void foo()
{
constexpr A<void> a(0);
}
};
===================================
bug.cc: In instantiation of 'void A< <template-parameter-1-1> >::foo() [with
<template-parameter-1-1> = void]':
bug.cc:14:2: required from here
bug.cc:12:26: internal compiler error: in tsubst_copy, at cp/pt.c:12862
constexpr A<void> a(0);
^
0x5de3f3 tsubst_copy
../../gcc/gcc/cp/pt.c:12862
0x5bba96 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:15071
0x5bcde6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:14873
0x5c5ab7 tsubst_expr
../../gcc/gcc/cp/pt.c:13776
0x5c6d7b tsubst_expr
../../gcc/gcc/cp/pt.c:13298
0x5c571e tsubst_expr
../../gcc/gcc/cp/pt.c:13395
0x5c271c instantiate_decl(tree_node*, int, bool)
../../gcc/gcc/cp/pt.c:19641
0x601167 instantiate_pending_templates(int)
../../gcc/gcc/cp/pt.c:19753
0x63c933 cp_write_global_declarations()
../../gcc/gcc/cp/decl2.c:4131
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/59268] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function
2013-11-23 23:07 [Bug c++/59268] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function reichelt at gcc dot gnu.org
@ 2013-11-25 9:16 ` rguenth at gcc dot gnu.org
2013-12-03 16:30 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-25 9:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59268
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Target Milestone|--- |4.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/59268] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function
2013-11-23 23:07 [Bug c++/59268] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function reichelt at gcc dot gnu.org
2013-11-25 9:16 ` [Bug c++/59268] " rguenth at gcc dot gnu.org
@ 2013-12-03 16:30 ` jakub at gcc dot gnu.org
2013-12-04 18:15 ` jakub at gcc dot gnu.org
2013-12-04 18:16 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-03 16:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59268
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-12-03
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 31364
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31364&action=edit
gcc49-pr59268.patch
Untested fix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/59268] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function
2013-11-23 23:07 [Bug c++/59268] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function reichelt at gcc dot gnu.org
2013-11-25 9:16 ` [Bug c++/59268] " rguenth at gcc dot gnu.org
2013-12-03 16:30 ` jakub at gcc dot gnu.org
@ 2013-12-04 18:15 ` jakub at gcc dot gnu.org
2013-12-04 18:16 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-04 18:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59268
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Dec 4 18:14:01 2013
New Revision: 205675
URL: http://gcc.gnu.org/viewcvs?rev=205675&root=gcc&view=rev
Log:
PR c++/59268
* pt.c (tsubst_copy_and_build): Handle POINTER_PLUS_EXPR.
* g++.dg/cpp0x/constexpr-template6.C: New test.
Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/pt.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/59268] [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function
2013-11-23 23:07 [Bug c++/59268] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2013-12-04 18:15 ` jakub at gcc dot gnu.org
@ 2013-12-04 18:16 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-04 18:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59268
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 4.8.3+, though with --enable-checking=release it doesn't ICE and just
works (because then tsubst_copy just passes it through unmodified, which is
sufficient here).
So IMHO not work doing anything for 4.7.x.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-12-04 18:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-23 23:07 [Bug c++/59268] New: [4.7/4.8/4.9 Regression] [c++11] ICE with constexpr in a virtual function reichelt at gcc dot gnu.org
2013-11-25 9:16 ` [Bug c++/59268] " rguenth at gcc dot gnu.org
2013-12-03 16:30 ` jakub at gcc dot gnu.org
2013-12-04 18:15 ` jakub at gcc dot gnu.org
2013-12-04 18:16 ` jakub at gcc dot gnu.org
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).