aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/g++.dg/other/crash-3.C
blob: d13821dee798d6c808dab2ebe874e95d738d44af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// { dg-do compile }
// { dg-options "-g" }
// Contributed by: <schmid at snake dot iap dot physik dot tu-darmstadt dot de>
//   and Niall Douglas <s_gccbugzilla at nedprod dot com>
// PR c++/14246: ice in write_template_arg_literal while mangling boolean
//   expressions.

namespace N1 {

  template <typename T>
  struct A {
      enum { Yes = (sizeof(T) == 1) };
  };

  template<bool T>
  struct B {
      void foo(void);
  };

  template struct B< !A<int>::Yes >;

}


namespace N2 {

  template<bool> struct A {};
  A<!false> a;

}