Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.brendan/crash10.C

raw
1 // { dg-do assemble }
2 // GROUPS passed old-abort
3 class word
4 {
5 unsigned char b1, b2;
6 public:
7 word (unsigned int i = 0) { b1 = i & 0xff; b2 = (i & 0xff00) >> 8; }
8 operator unsigned int () { return (b2 << 8) + b1; }
9 };
10
11 class just_another
12 {
13 int foo;
14 char bar[23];
15 };
16
17 int mumble(word w)
18 {
19 just_another *jap;
20 unsigned bar;
21
22 bar = w;
23
24 jap = new just_another [w];
25
26 return 0;
27 }
28