diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/conv1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/conv1.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/conv1.C b/gcc/testsuite/g++.old-deja/g++.pt/conv1.C new file mode 100644 index 000000000..7909e3f69 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/conv1.C @@ -0,0 +1,19 @@ +// { dg-do assemble } + +template <class T> +struct S1 {}; + +struct S2 +{ + template <class T> + operator S1<T>*(); +}; + +struct D: public S1<int> { +}; + +void f() +{ + S2 s; + (D*) s; // { dg-error "" } cannot convert +} |