public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33091]  New: [c++0x] ICE using remove_reference on variadic param pack
@ 2007-08-16 15:56 chris dot fairles at gmail dot com
  2007-08-16 15:57 ` [Bug c++/33091] " chris dot fairles at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: chris dot fairles at gmail dot com @ 2007-08-16 15:56 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1512 bytes --]

Environment:
System: Linux coffeebuzz.miovision.corp 2.6.18-8.1.8.el5 #1 SMP Tue Jul 10
06:39:17 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64

host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: ../gcc/configure CC=gcc43 CXX=g++43 --program-suffix=43
--disable-multilib --enable-languages=c,c++
Thread model: posix
gcc version 4.3.0 20070811 (experimental)

Description:

ICE when using
"typename std::remove_reference<_UElements>::type &&... "

Compiled with:
g++43 -std=c++0x -save-temps tuple_error.cpp -o tuple_error

Compiler output:
tuple_error.cpp: In function ‘int main()’:
tuple_error.cpp:65: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

How-To-Repeat:
Compile attached code:
g++43 -std=c++0x -save-temps tuple_error.cpp -o tuple_error


-- 
           Summary: [c++0x] ICE using remove_reference on variadic param
                    pack
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: chris dot fairles at gmail dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack
  2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
@ 2007-08-16 15:57 ` chris dot fairles at gmail dot com
  2007-08-16 15:58 ` chris dot fairles at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: chris dot fairles at gmail dot com @ 2007-08-16 15:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from chris dot fairles at gmail dot com  2007-08-16 15:57 -------
Created an attachment (id=14065)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14065&action=view)
source file that produces ICE

attached source file that causes ICE


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack
  2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
  2007-08-16 15:57 ` [Bug c++/33091] " chris dot fairles at gmail dot com
@ 2007-08-16 15:58 ` chris dot fairles at gmail dot com
  2007-08-16 15:59 ` chris dot fairles at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: chris dot fairles at gmail dot com @ 2007-08-16 15:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from chris dot fairles at gmail dot com  2007-08-16 15:58 -------
Created an attachment (id=14066)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14066&action=view)
-save-temps compiler output


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack
  2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
  2007-08-16 15:57 ` [Bug c++/33091] " chris dot fairles at gmail dot com
  2007-08-16 15:58 ` chris dot fairles at gmail dot com
@ 2007-08-16 15:59 ` chris dot fairles at gmail dot com
  2007-08-16 16:16 ` chris dot fairles at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: chris dot fairles at gmail dot com @ 2007-08-16 15:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from chris dot fairles at gmail dot com  2007-08-16 15:59 -------
Created an attachment (id=14067)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14067&action=view)
-save-temps compiler output


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack
  2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
                   ` (2 preceding siblings ...)
  2007-08-16 15:59 ` chris dot fairles at gmail dot com
@ 2007-08-16 16:16 ` chris dot fairles at gmail dot com
  2007-08-28 12:33 ` chris dot fairles at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: chris dot fairles at gmail dot com @ 2007-08-16 16:16 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]



------- Comment #4 from chris dot fairles at gmail dot com  2007-08-16 16:16 -------
Adding:

template<typename... _UElements>
tuple(const tuple<_UElements...>& __in, typename std::enable_if<
  std::is_same<
    std::integral_constant<std::size_t,sizeof...(_Elements)>,
    std::integral_constant<std::size_t,sizeof...(_UElements)>>::value>::type* =
0)
: _Inherited(__in) { }

(whether its legal or not) gives ICE:
prelude/tuple.hpp: In instantiation of ‘test::tuple<short int, int, double>’:
tuple_test.cpp:28:   instantiated from here
prelude/tuple.hpp:206: internal compiler error: tree check: expected tree_vec,
have type_pack_expansion in tsubst_copy_and_build, at cp/pt.c:10416

when explicitly instantiating template,
template class test::tuple<short, int, double>;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack
  2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
                   ` (3 preceding siblings ...)
  2007-08-16 16:16 ` chris dot fairles at gmail dot com
@ 2007-08-28 12:33 ` chris dot fairles at gmail dot com
  2007-11-05 17:00 ` dgregor at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: chris dot fairles at gmail dot com @ 2007-08-28 12:33 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 743 bytes --]



------- Comment #5 from chris dot fairles at gmail dot com  2007-08-28 12:32 -------
The following code snippet also causes an ICE (g++43 (GCC) 4.3.0 20070828
(experimental) with -Wall, -g and -std=c++0x)
test4.cpp: In instantiation of ‘A<int>’:
test4.cpp:11:   instantiated from here
test4.cpp:7: internal compiler error: tree check: expected tree_vec, have
type_pack_expansion in tsubst_copy_and_build, at cp/pt.c:10434


#include <type_traits>

template <typename... T>
struct A {
    template <typename... U>
    typename std::enable_if<(sizeof...(T) == sizeof...(U)),A&>::type
    operator=(A<U...> const&) {}
};

int main() {
    A<int> a;
    A<int,double> b;
    a = b;
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack
  2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
                   ` (4 preceding siblings ...)
  2007-08-28 12:33 ` chris dot fairles at gmail dot com
@ 2007-11-05 17:00 ` dgregor at gcc dot gnu dot org
  2007-12-04 19:27 ` dgregor at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-11-05 17:00 UTC (permalink / raw)
  To: gcc-bugs



-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dgregor at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-11-05 17:00:49
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack
  2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
                   ` (5 preceding siblings ...)
  2007-11-05 17:00 ` dgregor at gcc dot gnu dot org
@ 2007-12-04 19:27 ` dgregor at gcc dot gnu dot org
  2007-12-04 20:53 ` dgregor at gcc dot gnu dot org
  2007-12-07 21:44 ` reichelt at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-12-04 19:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dgregor at gcc dot gnu dot org  2007-12-04 19:27 -------
Subject: Bug 33091

Author: dgregor
Date: Tue Dec  4 19:27:14 2007
New Revision: 130604

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130604
Log:
2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>

       PR c++/33091
       * pt.c (unify_pack_expansion): If we didn't deduce any actual
       bindings for the template parameter pack, don't try to keep the
       empty deduced arguments.
       (unify): If a parameter is a template-id whose template argument
       list contains a pack expansion that is not at the end, then we
       cannot unify against that template-id.

2007-12-04  Douglas Gregor  <doug.gregor@gmail.com>

       PR c++/33091
       * g++.dg/cpp0x/variadic-unify.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/variadic-unify.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack
  2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
                   ` (6 preceding siblings ...)
  2007-12-04 19:27 ` dgregor at gcc dot gnu dot org
@ 2007-12-04 20:53 ` dgregor at gcc dot gnu dot org
  2007-12-07 21:44 ` reichelt at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-12-04 20:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dgregor at gcc dot gnu dot org  2007-12-04 20:53 -------
Fixed on mainline


-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/33091] [c++0x] ICE using remove_reference on variadic param pack
  2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
                   ` (7 preceding siblings ...)
  2007-12-04 20:53 ` dgregor at gcc dot gnu dot org
@ 2007-12-07 21:44 ` reichelt at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-12-07 21:44 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33091


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-12-07 21:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-16 15:56 [Bug c++/33091] New: [c++0x] ICE using remove_reference on variadic param pack chris dot fairles at gmail dot com
2007-08-16 15:57 ` [Bug c++/33091] " chris dot fairles at gmail dot com
2007-08-16 15:58 ` chris dot fairles at gmail dot com
2007-08-16 15:59 ` chris dot fairles at gmail dot com
2007-08-16 16:16 ` chris dot fairles at gmail dot com
2007-08-28 12:33 ` chris dot fairles at gmail dot com
2007-11-05 17:00 ` dgregor at gcc dot gnu dot org
2007-12-04 19:27 ` dgregor at gcc dot gnu dot org
2007-12-04 20:53 ` dgregor at gcc dot gnu dot org
2007-12-07 21:44 ` reichelt at gcc dot gnu dot 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).