https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65328

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-05
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
It is also interesting that gcc-5 rejects the testcase (4.8, 4.9 and clang
accept it):

In file included from ./fatal/type/pair.h:14:0,
                 from ./fatal/type/list.h:13,
                 from ./fatal/type/map.h:13,
                 from ./fatal/type/prefix_tree.h:13,
                 from fatal/type/benchmark/prefix_tree_benchmark.cpp:10:
./fatal/type/transform.h:1811:48: error: expected template-name before ‘<’
token
   using apply = typename with<>::template apply<T>;
                                                ^
./fatal/type/transform.h:1811:48: error: expected identifier before ‘<’ token
In file included from ./fatal/type/reflect_template.h:14:0,
                 from ./fatal/type/reflection.h:14,
                 from ./fatal/type/prefix_tree.h:14,
                 from fatal/type/benchmark/prefix_tree_benchmark.cpp:10:
./fatal/type/sequence.h: In static member function ‘static constexpr const
type* fatal::constant_sequence<T, Values>::data()’:
./fatal/type/sequence.h:150:48: error: incomplete type
‘fatal::constant_sequence<T, Values>::array<> {aka fatal::constant_array<T,
Values ...>}’ used in nested name specifier
   static constexpr type const *data() { return array<>::data(); }
                                                ^
./fatal/type/sequence.h: In static member function ‘static constexpr const
type* fatal::constant_sequence<T, Values>::z_data()’:
./fatal/type/sequence.h:175:50: error: incomplete type
‘fatal::constant_sequence<T, Values>::z_array<> {aka fatal::constant_array<T,
Values ..., static_cast<T>(0)>}’ used in nested name specifier
   static constexpr type const *z_data() { return z_array<>::data(); }
                                                  ^
while it still keeps running afterwards.

perf shows (I only ran it for ~2 minutes):

gcc-4.8
  21.48%  cc1plus  cc1plus            [.] comp_template_args_with_info
  16.94%  cc1plus  cc1plus            [.] structural_comptypes
   8.23%  cc1plus  cc1plus            [.] htab_find_slot_with_hash
   7.02%  cc1plus  cc1plus            [.] cp_tree_equal
   6.91%  cc1plus  cc1plus            [.] typename_compare
   6.72%  cc1plus  cc1plus            [.] eq_specializations
   5.39%  cc1plus  cc1plus            [.] cp_type_quals

gcc-4.9
  22.90%  cc1plus  cc1plus            [.] structural_comptypes
  21.53%  cc1plus  cc1plus            [.] eq_specializations
   8.20%  cc1plus  cc1plus            [.] make_typename_type
   6.27%  cc1plus  cc1plus            [.] template_args_equal
   5.88%  cc1plus  cc1plus            [.] comp_template_args_with_info
   5.82%  cc1plus  cc1plus            [.] cp_tree_equal
   5.53%  cc1plus  cc1plus            [.] typename_compar

gcc-5
  26.96%  cc1plus  cc1plus              [.] make_typename_type
  20.37%  cc1plus  cc1plus              [.] template_args_equal
  13.03%  cc1plus  cc1plus              [.] structural_comptypes
   5.17%  cc1plus  cc1plus              [.] cp_tree_equal
   4.43%  cc1plus  cc1plus              [.] tsubst_aggr_type
   4.15%  cc1plus  cc1plus              [.] comptypes

Reply via email to