1 // Explicit { dg-require-effective-target exceptions_enabled } to avoid verify compiler messages FAILs for '-fno-exceptions'.
2 // { dg-options "-Wcatch-value=1" }
4 struct A { virtual ~A() {} };
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 polymorphic type" }
34 template<typename T> void foo2()
55 foo1<A>(); // { dg-message "required" }
56 foo1<B>(); // { dg-message "required" }