summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/crash10.C
blob: 6680718bad63fd26ba80253ea95bdd21f3139c66 (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
// Build don't link: 
// GROUPS passed old-abort
class word
{
  unsigned char b1, b2;
public:
  word (unsigned int i = 0) { b1 = i & 0xff; b2 = (i & 0xff00) >> 8; }
  operator unsigned int () { return (b2 <<  8) + b1; }
};

class just_another
{
  int foo;
  char bar[23];
};

int mumble(word w)
{
  just_another *jap;
  unsigned bar;

  bar = w;
  
  jap = new just_another [w];
  
  return 0;
}