summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/crash5.C
blob: 0ac70297992509c3826a23e663cecfe42b7992f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-options "-w" }

class QString { // { dg-error "previous definition" }
  QString (const QString & a); // { dg-message "QString::QString|candidate expects" }
};

class QString { }; // { dg-error "redefinition" }

const QString q () {
  QString z; // { dg-error "matching" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 10 }
  int x;
  return x ? QString () : QString (); // { dg-error "matching" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 13 }
}