1// { dg-do assemble  }
2
3template <int I>
4struct S {};
5
6template <int J>
7void foo(S<J - 1>);
8
9template <class T>
10void baz(S<sizeof(T)>);
11
12template <int J>
13void fun(S<J>, S<J * 2>);
14
15void bar()
16{
17  foo<5>(S<4>()); // OK - 4 is 5 - 1.
18  baz<int>(S<sizeof(int)>()); // OK
19  fun(S<4>(), S<8>()); // OK - deduce J from first argument.
20}
21