2 // GROUPS passed old-abort
6 fubar(std::ostream* out, const char* s)
8 (*out) << s << std::endl;
15 // Declare a ref and a pointer to the same ostream.
17 std::ostream* out = &std::cerr;
18 std::ostream& die = std::cerr;
20 // Valid call to fubar.
22 fubar(out, "First line.");
24 // Invalid call to fubar. (1st arg is an ostream&. fubar expects
25 // ostream*.)This should be a syntax error, but g++ does not catch it.
26 // Call to this function results in a bus error in fubar when the 1st
27 // arg is dereferenced.
29 fubar(die, "Second line.");// { dg-error "" } cannot convert .die.*