| 1 |
/* Test that we do not have ice when compile */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -std=c++17" } */ |
| 4 |
|
| 5 |
typedef int a; |
| 6 |
typedef short b; |
| 7 |
typedef unsigned c; |
| 8 |
template < typename > using e = unsigned; |
| 9 |
template < typename > void ab(); |
| 10 |
#pragma riscv intrinsic "vector" |
| 11 |
template < typename f, int, int ac > struct g { |
| 12 |
using i = f; |
| 13 |
template < typename m > using j = g< m, 0, ac >; |
| 14 |
using k = g< i, 1, ac - 1 >; |
| 15 |
using ad = g< i, 1, ac + 1 >; |
| 16 |
}; |
| 17 |
namespace ae { |
| 18 |
struct af { |
| 19 |
using h = g< short, 6, 0 < 3 >; |
| 20 |
}; |
| 21 |
struct ag { |
| 22 |
using h = af::h; |
| 23 |
}; |
| 24 |
} template < typename, int > using ah = ae::ag::h; |
| 25 |
template < class ai > using aj = typename ai::i; |
| 26 |
template < class i, class ai > using j = typename ai::j< i >; |
| 27 |
template < class ai > using ak = j< e< ai >, ai >; |
| 28 |
template < class ai > using k = typename ai::k; |
| 29 |
template < class ai > using ad = typename ai::ad; |
| 30 |
template < a ap > vuint16m1_t ar(g< b, ap, 0 >, b); |
| 31 |
template < a ap > vuint16m2_t ar(g< b, ap, 1 >, b); |
| 32 |
template < a ap > vuint32m2_t ar(g< c, ap, 1 >, c); |
| 33 |
template < a ap > vuint32m4_t ar(g< c, ap, 2 >, c); |
| 34 |
template < class ai > using as = decltype(ar(ai(), aj< ai >())); |
| 35 |
template < class ai > as< ai > at(ai); |
| 36 |
namespace ae { |
| 37 |
template < int ap > vuint32m4_t au(g< c, ap, 1 + 1 >, vuint32m2_t l) { |
| 38 |
return __riscv_vlmul_ext_v_u32m2_u32m4(l); |
| 39 |
} |
| 40 |
} template < int ap > vuint32m2_t aw(g< c, ap, 1 >, vuint16m1_t l) { |
| 41 |
return __riscv_vzext_vf2_u32m2(l, 0); |
| 42 |
} |
| 43 |
namespace ae { |
| 44 |
vuint32m4_t ax(vuint32m4_t, vuint32m4_t, a); |
| 45 |
} |
| 46 |
template < class ay, class an > as< ay > az(ay ba, an bc) { |
| 47 |
an bb; |
| 48 |
return ae::ax(ae::au(ba, bc), ae::au(ba, bb), 2); |
| 49 |
} |
| 50 |
template < class bd > as< bd > be(bd, as< ad< bd > >); |
| 51 |
namespace ae { |
| 52 |
template < class bh, class bi > void bj(bh bk, bi bl) { |
| 53 |
ad< decltype(bk) > bn; |
| 54 |
az(bn, bl); |
| 55 |
} |
| 56 |
} template < int ap, int ac, class bp, class bq > |
| 57 |
void br(g< c, ap, ac > bk, bp, bq bl) { |
| 58 |
ae::bj(bk, bl); |
| 59 |
} |
| 60 |
template < class ai > using bs = decltype(at(ai())); |
| 61 |
struct bt; |
| 62 |
template < int ac = 1 > class bu { |
| 63 |
public: |
| 64 |
template < typename i > void operator()(i) { |
| 65 |
ah< i, ac > d; |
| 66 |
bt()(i(), d); |
| 67 |
} |
| 68 |
}; |
| 69 |
struct bt { |
| 70 |
template < typename bv, class bf > void operator()(bv, bf bw) { |
| 71 |
using bx = bv; |
| 72 |
ak< bf > by; |
| 73 |
k< bf > bz; |
| 74 |
using bq = bs< decltype(by) >; |
| 75 |
using bp = bs< decltype(bw) >; |
| 76 |
bp cb; |
| 77 |
ab< bx >(); |
| 78 |
for (;;) { |
| 79 |
bp cc; |
| 80 |
bq bl = aw(by, be(bz, cc)); |
| 81 |
br(by, cb, bl); |
| 82 |
} |
| 83 |
} |
| 84 |
}; |
| 85 |
void d() { bu()(b()); } |