[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / spellcheck-pr78656.C
blobded4bb6be852d742cfd152ffbe9c65ce28c8772e
1 // { dg-options "-fdiagnostics-show-caret" }
3 #include <memory>
5 void* allocate(std::size_t n)
7   return std::allocate<char>().allocate(n); // { dg-error ".allocate. is not a member of .std." }
8   // { dg-message "suggested alternative: .allocator." "" { target *-*-* } .-1 }
9   /* { dg-begin-multiline-output "" }
10    return std::allocate<char>().allocate(n);
11                ^~~~~~~~
12      { dg-end-multiline-output "" } */ 
13   /* { dg-begin-multiline-output "" }
14    return std::allocate<char>().allocate(n);
15                ^~~~~~~~
16                allocator
17      { dg-end-multiline-output "" } */
19   // Various errors follow that we don't care about; suppress them:
20   // { dg-excess-errors "7: " }
23 void* test_2(std::size_t n)
25   return std::alocator<char>().allocate(n); // { dg-error ".alocator. is not a member of .std." }
26   // { dg-message "suggested alternative: .allocator." "" { target *-*-* } .-1 }
27   /* { dg-begin-multiline-output "" }
28    return std::alocator<char>().allocate(n);
29                ^~~~~~~~
30      { dg-end-multiline-output "" } */ 
31   /* { dg-begin-multiline-output "" }
32    return std::alocator<char>().allocate(n);
33                ^~~~~~~~
34                allocator
35      { dg-end-multiline-output "" } */
37   // Various errors follow that we don't care about; suppress them:
38   // { dg-excess-errors "25: " }