public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53139] New: internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>'
@ 2012-04-27 10:10 i.nixman at gmail dot com
  2012-04-27 10:27 ` [Bug c++/53139] " marc.glisse at normalesup dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: i.nixman at gmail dot com @ 2012-04-27 10:10 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53139
           Summary: internal compiler error: expected a type, got
                    '#'tree_vec' not supported by dump_expr#<expression
                    error>'
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: i.nixman@gmail.com


This code:

// Compile: g++ -std=c++11 test.cpp
// Compile: clang++ -std=c++11 test.cpp

//#include <string>
//#include <iostream>

namespace my_types
{

struct nil {};

//original type
template <typename T, typename U>
struct chain
{
   typedef T first_type;
   typedef U second_type;
};

}

template <template <typename, typename> class Chain, typename Nil>
struct chain_generator
{
   template <typename T, typename... Args>
   struct gen
   {
   private:
      template <std::size_t S = sizeof...(Args), typename Dummy = void>
      struct inner
      {
         typedef Chain<T, typename gen<Args...>::type > type;
      };

      template <typename Dummy>
      struct inner<0, Dummy>
      {
         typedef Chain<T, Nil> type;
      };
   public:
      typedef typename inner<sizeof...(Args)>::type type;
   };
};

int main( /* int argc, char* argv[] */ )
{
   using my_types::chain;
   using my_types::nil;

   typedef chain<int, chain<float, chain<char, nil>>> t0;
   typedef chain_generator<chain, nil> my_gen;
   typedef my_gen::gen<int, float, char>::type t1;

   return 0;
}


when compiling with gcc-4.7.0 produce this errors:
> source.cpp:29:22: error: 'size_t' has not been declared
> source.cpp: In instantiation of 'struct chain_generator<my_types::chain, my_types::nil>::gen<int, float, char>::inner<2, void>':
> source.cpp:41:53:   required from 'struct chain_generator<my_types::chain, my_types::nil>::gen<int, float, char>'
> source.cpp:52:41:   required from here
> source.cpp:32:57: error: type/value mismatch at argument 1 in template parameter list for 'template<template<class, class> class Chain, class Nil> template<class T, class ... Args> struct chain_generator<Chain, Nil>::gen'
> source.cpp:32:57: error:   expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>'
> source.cpp:32:57: error: type/value mismatch at argument 2 in template parameter list for 'template<template<class, class> class Chain, class Nil> template<class T, class ... Args> struct chain_generator<Chain, Nil>::gen'
> source.cpp:32:57: error:   expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>'

when compiling with gcc-4.6.3 produce this errors:
> source.cpp:30:13: error: 'size_t' has not been declared
> source.cpp:33:41: sorry, unimplemented: cannot expand 'Args ...' into a fixed-length argument list
> source.cpp:33:49: error: template argument 2 is invalid
> source.cpp:33:51: error: expected '::' before 'type'

with clang this code compiled successfully.

gcc-4.7.0 test-drive:
http://liveworkspace.org/code/6287f6a38362af545712f43a56851a0b


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

* [Bug c++/53139] internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>'
  2012-04-27 10:10 [Bug c++/53139] New: internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>' i.nixman at gmail dot com
@ 2012-04-27 10:27 ` marc.glisse at normalesup dot org
  2012-04-27 10:40 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: marc.glisse at normalesup dot org @ 2012-04-27 10:27 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.glisse at normalesup
                   |                            |dot org

--- Comment #1 from Marc Glisse <marc.glisse at normalesup dot org> 2012-04-27 10:26:35 UTC ---
Works fine on trunk (since very recently). The 4.6 message looks fine (it
indeed wasn't implemented in 4.6). Can you check whether it works with a 4.7
snapshot?


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

* [Bug c++/53139] internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>'
  2012-04-27 10:10 [Bug c++/53139] New: internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>' i.nixman at gmail dot com
  2012-04-27 10:27 ` [Bug c++/53139] " marc.glisse at normalesup dot org
@ 2012-04-27 10:40 ` rguenth at gcc dot gnu.org
  2012-04-27 11:08 ` i.nixman at gmail dot com
  2012-04-27 11:23 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-27 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-04-27
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-27 10:40:10 UTC ---
Confirmed on the 4.7 branch.


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

* [Bug c++/53139] internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>'
  2012-04-27 10:10 [Bug c++/53139] New: internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>' i.nixman at gmail dot com
  2012-04-27 10:27 ` [Bug c++/53139] " marc.glisse at normalesup dot org
  2012-04-27 10:40 ` rguenth at gcc dot gnu.org
@ 2012-04-27 11:08 ` i.nixman at gmail dot com
  2012-04-27 11:23 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: i.nixman at gmail dot com @ 2012-04-27 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from niXman <i.nixman at gmail dot com> 2012-04-27 11:08:17 UTC ---
with 4.7-branch rev-186846 and trunk rev-186841 - everything is ok.


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

* [Bug c++/53139] internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>'
  2012-04-27 10:10 [Bug c++/53139] New: internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>' i.nixman at gmail dot com
                   ` (2 preceding siblings ...)
  2012-04-27 11:08 ` i.nixman at gmail dot com
@ 2012-04-27 11:23 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-27 11:23 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-27 11:23:00 UTC ---
Indeed.


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

end of thread, other threads:[~2012-04-27 11:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27 10:10 [Bug c++/53139] New: internal compiler error: expected a type, got '#'tree_vec' not supported by dump_expr#<expression error>' i.nixman at gmail dot com
2012-04-27 10:27 ` [Bug c++/53139] " marc.glisse at normalesup dot org
2012-04-27 10:40 ` rguenth at gcc dot gnu.org
2012-04-27 11:08 ` i.nixman at gmail dot com
2012-04-27 11:23 ` rguenth 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).