[Bug c++/68884] template of value template crashes the compiler

2017-10-18 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68884

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.2

--- Comment #7 from Paolo Carlini  ---
Fixed for 6.2.0.

[Bug c++/68884] template of value template crashes the compiler

2017-10-18 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68884

--- Comment #6 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Wed Oct 18 07:43:06 2017
New Revision: 253843

URL: https://gcc.gnu.org/viewcvs?rev=253843=gcc=rev
Log:
2017-10-18  Paolo Carlini  

PR c++/68884
* g++.dg/cpp0x/variadic-crash4.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic-crash4.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/68884] template of value template crashes the compiler

2015-12-13 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68884

--- Comment #5 from Markus Trippelsdorf  ---
markus@x4 /tmp % cat tst.ii
namespace std {
template  struct A { static constexpr _Tp value = __v;
};
typedef A true_type;
}
template  struct VsA;
template  struct ValueTemplate {
  template  class, class> struct IsInstanceOf;
  template  class TemplateA, ValueType... TypesA>
  struct IsInstanceOf : std::true_type {};
};
bool foo = ValueTemplate::IsInstanceOf>::value;


markus@x4 /tmp % g++ -c tst.ii
tst.ii:11:57: internal compiler error: in tsubst, at cp/pt.c:12869
 bool foo = ValueTemplate::IsInstanceOf>::value;
 ^~

0x64ff30 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:12869
0x6524b0 convert_template_argument
../../gcc/gcc/cp/pt.c:7194
0x65f379 coerce_template_parms
../../gcc/gcc/cp/pt.c:7684
0x66d267 unify
../../gcc/gcc/cp/pt.c:19378
0x66c88b unify
../../gcc/gcc/cp/pt.c:19709
0x66ebff get_partial_spec_bindings
../../gcc/gcc/cp/pt.c:20469
0x66687a most_specialized_partial_spec
../../gcc/gcc/cp/pt.c:20741
0x682153 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:9698
0x682153 instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:10259
0x72b43b complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:131
0x6f8b90 cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:6027
0x71bcc9 cp_parser_simple_type_specifier
../../gcc/gcc/cp/parser.c:16120
0x6f7456 cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:6533
0x700ff4 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7901
0x701c7b cp_parser_cast_expression
../../gcc/gcc/cp/parser.c:8578
0x702097 cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:8679
0x702a74 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8966
0x70300a cp_parser_constant_expression
../../gcc/gcc/cp/parser.c:9236
0x7038f5 cp_parser_initializer_clause
../../gcc/gcc/cp/parser.c:20679
0x7057f5 cp_parser_initializer
../../gcc/gcc/cp/parser.c:20622

[Bug c++/68884] template of value template crashes the compiler

2015-12-13 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68884

Markus Trippelsdorf  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-13
 CC||trippels at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Markus Trippelsdorf  ---
Confirmed. All supported gcc versions ICE.
clang and icpc accept the code.

[Bug c++/68884] template of value template crashes the compiler

2015-12-13 Thread meinaccountnr2 at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68884

--- Comment #3 from meinaccountnr2 at web dot de ---
Created attachment 37023
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37023=edit
ubuntu crash report

[Bug c++/68884] template of value template crashes the compiler

2015-12-13 Thread meinaccountnr2 at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68884

--- Comment #2 from meinaccountnr2 at web dot de ---
Created attachment 37022
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37022=edit
Preprocessed source

[Bug c++/68884] template of value template crashes the compiler

2015-12-13 Thread meinaccountnr2 at web dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68884

--- Comment #1 from meinaccountnr2 at web dot de ---
Created attachment 37021
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37021=edit
console output