1 // Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
2 // { dg-options "-Wcatch-value=2" }
4 struct A { virtual ~A() {} };
12 catch (D) {} // { dg-warning "10:catching type" }
13 catch (C) {} // { dg-warning "10:catching type" }
14 catch (B) {} // { dg-warning "10:catching polymorphic type" }
15 catch (A) {} // { dg-warning "10:catching polymorphic type" }
28 template<typename T> void foo1()
31 catch (T) {} // { dg-warning "10:catching" }
34 template<typename T> void foo2()
55 foo1<A>(); // { dg-message "required" }
56 foo1<B>(); // { dg-message "required" }
57 foo1<C>(); // { dg-message "required" }
58 foo1<D>(); // { dg-message "required" }