From 151ab2f29e19a6194329b37c8e9c379b5f0697b8 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Sun, 2 Aug 1998 21:27:51 +0000 Subject: New test From-SVN: r21543 --- gcc/testsuite/g++.old-deja/g++.pt/crash16.C | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/crash16.C (limited to 'gcc') diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash16.C b/gcc/testsuite/g++.old-deja/g++.pt/crash16.C new file mode 100644 index 0000000..ed12b90 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash16.C @@ -0,0 +1,28 @@ +// Build don't link: +// Special g++ Options: + +extern "C" void qsort(); + +struct R { + int count; + int state1; + int state2; +}; + +int cmp_d(const R* a, const R* b) { + return a->count > b->count; +} + +namespace CXX { + template + inline void qsort (T b[i1][i2], int (*cmp)(const T*, const T*)) { + ::qsort ((void*)b, i1*i2, sizeof(T), (int (*)(const void *, const void *))cmp); + } +} + +using namespace CXX; + +void sort_machine() { + struct R d[256][256]; + qsort (d, cmp_d); +} -- cgit v1.1