Debian Codegraph @

gcc/testsuite/g++.dg/opt/pr65074.C

raw
1 // PR middle-end/65074
2 // { dg-do link { target pie } }
3 // { dg-options "-pie -fpie -O2" }
4 // { dg-skip-if "requires hosted libstdc++ for fstream" { ! hostedlib } }
5
6 #include <fstream>
7
8 using namespace std;
9
10 __attribute__((noinline, noclone)) void
11 foo (const char *fname)
12 {
13 ifstream f (fname);
14 }
15
16 int
17 main ()
18 {
19 foo ("foobar");
20 }