summaryrefslogtreecommitdiffstats
path: root/kdbg/testprogs/repeats.cpp
blob: a7998dfc8573b7c885ac4158a60944ef719b17fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// test <repeats 30 times> in arrays

#include <qstring.h>

struct Big {
    struct bog {
	short b[40];
    } a[40];
    short c[40][40];
};

static void f(int)
{
}


int main()
{
    struct Big big = {{{ 2,}}};
    big.a[0].b[39]=7;
    big.a[38].b[39]=6;

    // array of pointer to function
    void (*apf[30])(int);

    for (int i = 1; i < 29; i++)
	apf[i] = f;

    QString s[300];

    for (int i = 0; i < 300; i++)
	s[i].sprintf("String %d", i);

    s[21] = s[48];

    int many[300];
    for (int i = 0; i < 300; i++)
	    many[i] = i;

    return 0;
}