summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.eh/throw2.C
blob: 63bb029d9067a0f66d779c66380e041f119342fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }

// Submitted by Sebastian Ritterbusch <uabp@rz.uni-karlsruhe.de>

#define ANY int // a class with a public constructor

void athrow(const ANY & e) throw(ANY)
{
   throw e; // { dg-bogus "" } discarding const
}

int main(void)
{
   athrow(ANY());
   return 0;
}