[Bug c++/57524] internal compiler error on dump translation unit

2014-01-02 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 CC||trippels at gcc dot gnu.org
  Known to fail||4.9.0

--- Comment #11 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
This still happens with 4.9:

markus@x4 more % cat test.ii
namespace detail {
namespace indirect_traits {}
using namespace indirect_traits;
void fn1() {
using namespace detail;
}
}

markus@x4 more % g++ -ftime-report -c test.ii
test.ii: In function ‘void detail::fn1()’:
test.ii:5:17: internal compiler error: in timevar_start, at timevar.c:343
 using namespace detail;
 ^

[Bug c++/57524] internal compiler error on dump translation unit

2013-06-10 Thread JamesMikeDuPont at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

--- Comment #10 from James Michael DuPont JamesMikeDuPont at googlemail dot 
com ---
I have reported the problem in the code to boost, they have fixed it.
https://svn.boost.org/trac/boost/ticket/8651#comment:1

The problem is having to do with underspecifed namespace selection. They
changed the code to remove the crash.

mike


[Bug c++/57524] internal compiler error on dump translation unit

2013-06-08 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

Marc Glisse glisse at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed|2013-06-05 00:00:00 |2013-06-08
 Ever confirmed|0   |1
  Known to fail||4.7.3, 4.8.0

--- Comment #9 from Marc Glisse glisse at gcc dot gnu.org ---
Calling cc1plus directly, I can reproduce with trunk. The failing assert in
timevar.c is:

  /* Don't allow the same timing variable to be started more than
 once.  */
  gcc_assert (!tv-standalone);


/usr/include/boost/variant/detail/hash_variant.hpp:33:24: internal compiler
error: in timevar_start, at timevar.c:343
0xcce161 timevar_start(timevar_id_t)
/data/repos/gcc/trunk/gcc/timevar.c:343
0x7cfa85 push_using_directive
/data/repos/gcc/trunk/gcc/cp/name-lookup.c:5652
0x7cfa34 push_using_directive_1
/data/repos/gcc/trunk/gcc/cp/name-lookup.c:5641
0x7cfa91 push_using_directive
/data/repos/gcc/trunk/gcc/cp/name-lookup.c:5653
0x7ca70e do_using_directive(tree_node*)
/data/repos/gcc/trunk/gcc/cp/name-lookup.c:3933
0x7ca7a7 parse_using_directive(tree_node*, tree_node*)
/data/repos/gcc/trunk/gcc/cp/name-lookup.c:3957
0x6ddce4 cp_parser_using_directive
/data/repos/gcc/trunk/gcc/cp/parser.c:15732
0x6d5ceb cp_parser_block_declaration
/data/repos/gcc/trunk/gcc/cp/parser.c:10670
0x6d53df cp_parser_declaration_statement
/data/repos/gcc/trunk/gcc/cp/parser.c:10344
0x6d2e33 cp_parser_statement
/data/repos/gcc/trunk/gcc/cp/parser.c:9107
0x6d371b cp_parser_statement_seq_opt
/data/repos/gcc/trunk/gcc/cp/parser.c:9379
0x6d361e cp_parser_compound_statement
/data/repos/gcc/trunk/gcc/cp/parser.c:9333
0x6e1e23 cp_parser_function_body
/data/repos/gcc/trunk/gcc/cp/parser.c:18066
0x6e20b0 cp_parser_ctor_initializer_opt_and_function_body
/data/repos/gcc/trunk/gcc/cp/parser.c:18102
0x6e8f28 cp_parser_function_definition_after_declarator
/data/repos/gcc/trunk/gcc/cp/parser.c:22080
0x6eab72 cp_parser_late_parsing_for_member
/data/repos/gcc/trunk/gcc/cp/parser.c:22730
0x6e36cc cp_parser_class_specifier_1
/data/repos/gcc/trunk/gcc/cp/parser.c:18825
0x6e3795 cp_parser_class_specifier
/data/repos/gcc/trunk/gcc/cp/parser.c:18849
0x6da899 cp_parser_type_specifier
/data/repos/gcc/trunk/gcc/cp/parser.c:13861
0x6d66b4 cp_parser_decl_specifier_seq
/data/repos/gcc/trunk/gcc/cp/parser.c:11152


[Bug c++/57524] internal compiler error on dump translation unit

2013-06-05 Thread JamesMikeDuPont at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

--- Comment #2 from James Michael DuPont JamesMikeDuPont at googlemail dot 
com ---
Here is a small change to work around the crash :

namespace boost {

namespace detail { namespace variant {
struct variant_hasher: public //boost::
static_visitorstd::size_t {
template class T
std::size_t operator()(T const val) const {
  //using namespace boost;
hashT hasher;
return hasher(val);
}
};
}}
}

It is the uneeded namespace usage that causes the problem.


[Bug c++/57524] internal compiler error on dump translation unit

2013-06-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2013-06-05
 Ever confirmed|0   |1

--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com ---
I'm still not seeing in attach a self contained (minimized) reproducer.


[Bug c++/57524] internal compiler error on dump translation unit

2013-06-05 Thread JamesMikeDuPont at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

--- Comment #4 from James Michael DuPont JamesMikeDuPont at googlemail dot 
com ---
Created attachment 30259
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30259action=edit
test case

this is the minimal test case that I have.
by applying the small namespace changes to the end it will go away.


[Bug c++/57524] internal compiler error on dump translation unit

2013-06-05 Thread JamesMikeDuPont at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

--- Comment #5 from James Michael DuPont JamesMikeDuPont at googlemail dot 
com ---
Sorry, It seems that the original attachment was not applied, I have bzip2ed it
so now it fits.
thanks
mike


[Bug c++/57524] internal compiler error on dump translation unit

2013-06-05 Thread JamesMikeDuPont at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

--- Comment #6 from James Michael DuPont JamesMikeDuPont at googlemail dot 
com ---
I have filed a small cosmetic bug in boost about this change to the namespace
usage :
https://svn.boost.org/trac/boost/ticket/8651


[Bug c++/57524] internal compiler error on dump translation unit

2013-06-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|WAITING |UNCONFIRMED
 Ever confirmed|1   |0

--- Comment #7 from Paolo Carlini paolo.carlini at oracle dot com ---
I can't reproduce the issue anywhere. Eg, not on stock FSF 4.7.2, not on 4.8 or
current mainline.

Can somebody reproduce?


[Bug c++/57524] internal compiler error on dump translation unit

2013-06-05 Thread JamesMikeDuPont at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

--- Comment #8 from James Michael DuPont JamesMikeDuPont at googlemail dot 
com ---
Tested like this:
/usr/lib/gcc/x86_64-linux-gnu/4.7/cc1plus -std=gnu++11 -fdump-translation-unit
testvariant_min.ii


[Bug c++/57524] internal compiler error on dump translation unit

2013-06-04 Thread JamesMikeDuPont at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524

--- Comment #1 from James Michael DuPont JamesMikeDuPont at googlemail dot 
com ---
I tried to reduce the input size but it is not producing any results.

namespace std {
  typedef long unsigned int size_t;
};
namespace boost { 
  namespace detail {
struct is_static_visitor_tag { };
typedef void static_visitor_default_return;
  } 
  template typename R = ::boost::detail::static_visitor_default_return
  class static_visitor: public detail::is_static_visitor_tag {
  public:
typedef R result_type;
  protected:
static_visitor() { }~static_visitor() { }
  };}
namespace boost
{
  template class T struct hash;
  template class T void hash_combine(std::size_t seed, T const v);
  template class It std::size_t hash_range(It, It);
  template class It void hash_range(std::size_t, It, It);
}
namespace boost {
  namespace detail { namespace variant {
  struct variant_hasher: public boost::static_visitorstd::size_t {
template class T
std::size_t operator()(T const val) const {
  using namespace boost;
  hashT hasher;
  return hasher(val);
}  };}  }}