From e1b580335491398ed4f74a7db0c64704a0432804 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 29 Nov 2019 14:36:47 +0100 Subject: [PATCH] Add an x86_64 test for PR 92476 2019-11-29 Martin Jambor PR ipa/92476 * g++.dg/lto/pr92476_[01].C: New test. From-SVN: r278842 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/lto/pr92476_0.C | 20 ++++++++++++++++++++ gcc/testsuite/g++.dg/lto/pr92476_1.C | 13 +++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 gcc/testsuite/g++.dg/lto/pr92476_0.C create mode 100644 gcc/testsuite/g++.dg/lto/pr92476_1.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index aa3a347ee14..f7a173e15d2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-11-29 Martin Jambor + + PR ipa/92476 + * g++.dg/lto/pr92476_[01].C: New test. + 2019-11-29 Richard Sandiford PR tree-optimization/92710 diff --git a/gcc/testsuite/g++.dg/lto/pr92476_0.C b/gcc/testsuite/g++.dg/lto/pr92476_0.C new file mode 100644 index 00000000000..5bbc9236f4d --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/pr92476_0.C @@ -0,0 +1,20 @@ +// { dg-lto-do link } +// { dg-lto-options { { -O0 -flto -shared -fPIC -fvisibility=hidden } } } +// { dg-require-effective-target fpic } +// { dg-require-effective-target shared } +// { dg-extra-ld-options "-shared" } + +namespace Passenger { +namespace Json { +class Value {}; +} // namespace Json +namespace ConfigKit { +class Translator {}; +} // namespace ConfigKit +namespace LoggingKit { +void initialize(const Json::Value & = Json::Value(), + const ConfigKit::Translator & = ConfigKit::Translator()); +void init_module() { initialize(); } +} // namespace LoggingKit +} // namespace Passenger + diff --git a/gcc/testsuite/g++.dg/lto/pr92476_1.C b/gcc/testsuite/g++.dg/lto/pr92476_1.C new file mode 100644 index 00000000000..cd29613b808 --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/pr92476_1.C @@ -0,0 +1,13 @@ +// { dg-options { -O2 -flto -shared -fPIC -fvisibility=hidden } } + +namespace Passenger { +namespace Json { +class Value; +} +namespace ConfigKit { +class Translator; +} +namespace LoggingKit { +void initialize(const Json::Value &, const ConfigKit::Translator &) {} +} // namespace LoggingKit +} // namespace Passenger -- 2.30.2