1321936Shselasky// { dg-do compile }
2321936Shselasky// Origin: <v dot haisman at sh dot cvut dot cz>
3321936Shselasky// PR c++/13957: Improved error message for type in template (when non-type
4321936Shselasky//  is expected).
5321936Shselasky
6321936Shselaskytemplate <class T>
7321936Shselaskystruct A
8321936Shselasky{
9321936Shselasky  typedef int type;
10321936Shselasky};
11321936Shselasky
12321936Shselaskytemplate <class T>
13321936Shselaskyvoid func(void)
14321936Shselasky{
15321936Shselasky  (void)A<T>::type();	 // { dg-error "non-type" "non-type" }
16321936Shselasky// { dg-message "if a type" "note" { target *-*-* } 15 }
17321936Shselasky}
18321936Shselasky
19321936Shselaskytemplate void func<float>(void);    // { dg-message "required from here" }
20321936Shselasky