diff options
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp77.C')
-rwxr-xr-x | gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp77.C | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp77.C b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp77.C new file mode 100755 index 0000000..ca4cf20 --- /dev/null +++ b/gcc_arm/testsuite/g++.old-deja/g++.pt/memtemp77.C @@ -0,0 +1,25 @@ +extern "C" int strcmp(const char*, const char*); + +template <class T> +struct S3 +{ + template <class U> + static char* h(U); +}; + +template <> +template <> +char* S3<double>::h(int) { return __PRETTY_FUNCTION__; } + +template <> +template <> +char* S3<char>::h(int) { return __PRETTY_FUNCTION__; } + +int main() +{ + if (strcmp (S3<double>::h(7), + "static char * S3<double>::h<int>(int)") == 0) + return 0; + else + return 1; +} |