summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/crash48.C
blob: fe759406ee139b0eeae8bf0c4893a48c55cf6083 (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
// { dg-do compile }
// GROUPS passed old-abort
class internal { // { dg-message "internal::internal|candidate expects|no known conversion" }
	int field;
	int anotherfield;
};

class bug { // { dg-message "bug::bug|candidate expects" }
	internal* numbers;
	bug(int size);
};

bug::bug(int size) // { dg-message "bug::bug|candidate expects" }
{
  numbers = new internal(size * size);// { dg-error "no match" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 15 }
}

int
main()
{
  bug test; // { dg-error "no match" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
}