public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template
@ 2012-11-06 12:52 alex.irger at gmail dot com
2012-11-06 13:09 ` [Bug c++/55220] " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: alex.irger at gmail dot com @ 2012-11-06 12:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55220
Bug #: 55220
Summary: [c++11] Internal error when doing partial template
specialization on variadic template
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: alex.irger@gmail.com
GCC is reporting internal error when compiling the following well-formed (to my
belief) code:
#include <iostream>
template <typename ...> struct something_like_tuple
{
};
template <typename, typename> struct is_last
{
static const bool value = false;
};
template <typename T, template <typename ...> class Tuple, typename ... Head>
struct is_last<T, Tuple<Head ..., T>>
{
static const bool value = true;
};
int main(int argc, char* argv[])
{
typedef something_like_tuple<char, int, float> something_like_tuple_t;
std::cout << is_last<float, something_like_tuple_t>::value << std::endl; /*
<-- line 23 */
std::cout << is_last<int, something_like_tuple_t>::value << std::endl;
}
g++ invoked as following:
g++ --std=c++11 test.cpp -o test
Output:
test.cpp: In function âint main(int, char**)â:
test.cpp:23:53: internal compiler error: in unify, at cp/pt.c:16952
Please submit a full bug report,
with preprocessed source if appropriate.
g++ -v
Using built-in specs.
COLLECT_GCC=##I believe not relevant##
COLLECT_LTO_WRAPPER=##I believe not relevant##
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=##I believe not relevant##
--enable-threads=posix --enable-shared --enable-checking=release
--enable-languages=c,c++ i686-pc-linux-gnu --with-mpc-include=##I believe not
relevant## --with-mpc-lib=##I believe not relevant##
Thread model: posix
gcc version 4.7.1 (GCC)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55220] [c++11] Internal error when doing partial template specialization on variadic template
2012-11-06 12:52 [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template alex.irger at gmail dot com
@ 2012-11-06 13:09 ` redi at gcc dot gnu.org
2012-11-06 13:28 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2012-11-06 13:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55220
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|rejects-valid |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-11-06
Known to work| |4.8.0
Ever Confirmed|0 |1
Known to fail| |4.6.3, 4.7.1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-06 13:09:32 UTC ---
compiles ok on trunk
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55220] [c++11] Internal error when doing partial template specialization on variadic template
2012-11-06 12:52 [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template alex.irger at gmail dot com
2012-11-06 13:09 ` [Bug c++/55220] " redi at gcc dot gnu.org
@ 2012-11-06 13:28 ` redi at gcc dot gnu.org
2012-11-06 14:11 ` [Bug c++/55220] [c++11] ICE " paolo.carlini at oracle dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2012-11-06 13:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55220
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.7.3
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-06 13:27:39 UTC ---
seems to be fixed already for 4.7.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55220] [c++11] ICE when doing partial template specialization on variadic template
2012-11-06 12:52 [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template alex.irger at gmail dot com
2012-11-06 13:09 ` [Bug c++/55220] " redi at gcc dot gnu.org
2012-11-06 13:28 ` redi at gcc dot gnu.org
@ 2012-11-06 14:11 ` paolo.carlini at oracle dot com
2012-11-06 14:39 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-06 14:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55220
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|4.7.3, 4.8.0 |
Summary|[c++11] Internal error when |[c++11] ICE when doing
|doing partial template |partial template
|specialization on variadic |specialization on variadic
|template |template
Known to fail|4.7.1 |4.5.4, 4.7.3, 4.8.0
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-06 14:11:05 UTC ---
Unfortunately I can reproduce it everywhere. Doesn't seem a regression, though,
we may have a duplicate.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55220] [c++11] ICE when doing partial template specialization on variadic template
2012-11-06 12:52 [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template alex.irger at gmail dot com
` (2 preceding siblings ...)
2012-11-06 14:11 ` [Bug c++/55220] [c++11] ICE " paolo.carlini at oracle dot com
@ 2012-11-06 14:39 ` redi at gcc dot gnu.org
2013-02-15 1:27 ` jason at gcc dot gnu.org
2013-02-15 11:18 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2012-11-06 14:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55220
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-06 14:39:31 UTC ---
Ah, it compiles OK if GCC is built with --disable-checking, but fails otherwise
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55220] [c++11] ICE when doing partial template specialization on variadic template
2012-11-06 12:52 [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template alex.irger at gmail dot com
` (3 preceding siblings ...)
2012-11-06 14:39 ` redi at gcc dot gnu.org
@ 2013-02-15 1:27 ` jason at gcc dot gnu.org
2013-02-15 11:18 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-15 1:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55220
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-15 01:27:20 UTC ---
Author: jason
Date: Fri Feb 15 01:27:12 2013
New Revision: 196068
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196068
Log:
PR c++/55220
* pt.c (unify): A pack expansion that is not the last template
argument makes the entire template argument list non-deduced.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55220] [c++11] ICE when doing partial template specialization on variadic template
2012-11-06 12:52 [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template alex.irger at gmail dot com
` (4 preceding siblings ...)
2013-02-15 1:27 ` jason at gcc dot gnu.org
@ 2013-02-15 11:18 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-15 11:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55220
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.8.0
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-15 11:18:07 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-15 11:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-06 12:52 [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template alex.irger at gmail dot com
2012-11-06 13:09 ` [Bug c++/55220] " redi at gcc dot gnu.org
2012-11-06 13:28 ` redi at gcc dot gnu.org
2012-11-06 14:11 ` [Bug c++/55220] [c++11] ICE " paolo.carlini at oracle dot com
2012-11-06 14:39 ` redi at gcc dot gnu.org
2013-02-15 1:27 ` jason at gcc dot gnu.org
2013-02-15 11:18 ` 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).