diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/crash3.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/crash3.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash3.C b/gcc/testsuite/g++.old-deja/g++.jason/crash3.C new file mode 100644 index 000000000..9dcf6368a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.jason/crash3.C @@ -0,0 +1,14 @@ +// { dg-do assemble } +// Bug: g++ tries to generate initialization semantics for a Node from an int, +// and fails. + +struct Node // { dg-message "note" } +{ + Node* child[2]; +}; + +void bug(int i) +{ + Node* q = new Node(i); // { dg-error "no matching" } + // { dg-message "candidate" "candidate note" { target *-*-* } 12 } +} |