aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mmitchel@gcc.gnu.org>1998-08-02 21:27:51 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1998-08-02 21:27:51 +0000
commit151ab2f29e19a6194329b37c8e9c379b5f0697b8 (patch)
treeae68b04b012e14fccc9ff8defef169168bbaeb88 /gcc
parent46103ab43a2d4a44a8a884eecc749ec531cd3d17 (diff)
downloadgcc-151ab2f29e19a6194329b37c8e9c379b5f0697b8.zip
gcc-151ab2f29e19a6194329b37c8e9c379b5f0697b8.tar.gz
gcc-151ab2f29e19a6194329b37c8e9c379b5f0697b8.tar.bz2
New test
From-SVN: r21543
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash16.C28
1 files changed, 28 insertions, 0 deletions
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<class T, int i1, int i2>
+ 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<R,256> (d, cmp_d);
+}