2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / ns15.C
blob567db4cf60b705e93c492e08ceacb04b6a05ae8b
1 // { dg-do assemble { xfail xstormy16-*-* } }
3 #include <stdio.h>
4 #include <stdlib.h>
6 #define MAX 256
7 #define MAXSTATE 1000000
9 struct R {
10   int count;
11   int state1;
12   int state2;
15 int cmp_d(const R* a, const R* b) {
16   return a->count > b->count;
19 namespace CXX {
20   template<class T, long i1, long i2>
21     inline void qsort (T b[i1][i2], int (*cmp)(const T*, const T*)) {
22     ::qsort ((void*)b, i1*i2, sizeof(T), (int (*)(const void *, const void *))cmp);
23   }
26 using namespace CXX;
28 void sort_machine() {
29   struct R d[MAX][MAX];
30   qsort<R,MAX> (d, cmp_d);