diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a2ca2c86716..65303b19ede 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-02-19 Jakub Jelinek + + PR middle-end/65074 + * g++.dg/opt/pr65074.C: New file. + 2015-02-19 Andrea Azzarone * g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C diff --git a/gcc/testsuite/g++.dg/opt/pr65074.C b/gcc/testsuite/g++.dg/opt/pr65074.C new file mode 100644 index 00000000000..01c5926e662 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr65074.C @@ -0,0 +1,19 @@ +// PR middle-end/65074 +// { dg-do link { target pie } } +// { dg-options "-pie -fpie -O2" } + +#include + +using namespace std; + +__attribute__((noinline, noclone)) void +foo (const char *fname) +{ + ifstream f (fname); +} + +int +main () +{ + foo ("foobar"); +}