Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.law/weak.C

raw
1 // { dg-do link { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } }
2 // { dg-require-effective-target static }
3 // { dg-options "-static" }
4 // { dg-skip-if "requires hosted libstdc++ for iostream" { ! hostedlib } }
5
6 // Bug: g++ fails to instantiate operator<<.
7
8 // libc-5.4.xx has __IO_putc in its static C library, which can conflict
9 // with the copy of __IO_putc in the libstdc++ library built by egcs.
10 #include <iostream>
11 #include <streambuf>
12 #include <cstdio>
13
14 std::istream x (0);
15
16 int
17 main () {
18 x.get();
19 std::putc(0, 0);
20 std::fgets(0, 0, 0);
21 x.get((char*) 0, 0);
22 return 0;
23 }
24