OSDN Git Service

gcc/cp/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.brendan / crash29.C
1 // { dg-do assemble  }
2 // GROUPS passed old-abort
3
4 union Value
5 {
6         Value(){}
7 };
8
9 struct GlobalAddress            // { dg-message "note" }
10 {
11         GlobalAddress(Value *nvar){} // { dg-message "note" }
12 };
13
14 int
15 main()
16 {
17         new GlobalAddress(Value());             // internal error occured here// { dg-error "no matching" }
18         // { dg-message "candidate" "candidate note" { target *-*-* } 17 }
19         //new GlobalAddress(new Value());       // This line is correct code
20 }