diff options
author | Martin Liska <mliska@suse.cz> | 2014-09-22 11:39:20 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2014-09-22 09:39:20 +0000 |
commit | 6e5dedda84b1879e814ad686adc3f00ab063c15c (patch) | |
tree | 87b336f69a9afbdc66c944b5315676e6b16d6386 /gcc | |
parent | c2095627b7499fa8ec58f29e00b12eaa6e32041e (diff) | |
download | gcc-6e5dedda84b1879e814ad686adc3f00ab063c15c.zip gcc-6e5dedda84b1879e814ad686adc3f00ab063c15c.tar.gz gcc-6e5dedda84b1879e814ad686adc3f00ab063c15c.tar.bz2 |
PR lto/63270 - new test
* g++.dg/lto/pr63270_0.C: New test.
* g++.dg/lto/pr63270_1.C: New test.
From-SVN: r215451
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/lto/pr63270_0.C | 72 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/lto/pr63270_1.C | 53 |
3 files changed, 131 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 61b15e0..c200560 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-09-22 Martin Liska <mliska@suse.cz> + + PR lto/63270 + * g++.dg/lto/pr63270_0.C: New test. + * g++.dg/lto/pr63270_1.C: New test. + 2014-09-21 Uros Bizjak <ubizjak@gmail.com> * gcc.target/i386/avx-vzeroupper-16.c (dg-final): Remove check diff --git a/gcc/testsuite/g++.dg/lto/pr63270_0.C b/gcc/testsuite/g++.dg/lto/pr63270_0.C new file mode 100644 index 0000000..98f2735 --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/pr63270_0.C @@ -0,0 +1,72 @@ +// { dg-lto-do link } +// { dg-lto-options {{-flto -O2 -Wno-odr}} } +typedef unsigned long uintptr_t; +namespace v8 { +class Extension; +namespace internal { +class A { +public: + A(int); +}; +class B { +public: + B(int); +}; +class Scanner; +class FuncNameInferrer; +template <typename Traits> class ParserBase : Traits { + class FunctionState; + bool parenthesized_function_; + typename Traits::Type::Scope *scope_; + FunctionState *function_state_; + v8::Extension *extension_; + FuncNameInferrer *fni_; + Scanner *scanner_; + uintptr_t stack_limit_; + bool stack_overflow_; + bool allow_lazy_; + bool allow_natives_syntax_; + bool allow_generators_; + bool allow_for_of_; + typename Traits::Type::Zone *zone_; +}; +class PreParserScope; +class F; +class PreParserTraits { +public: + struct Type { + typedef PreParserScope Scope; + typedef void Zone; + }; + +private: + F *pre_parser_; +}; +class F : ParserBase<PreParserTraits> {}; +class C { +public: + struct Type { + typedef v8::internal::FuncNameInferrer Scope; + typedef int Zone; + }; +}; +class G : ParserBase<C> { +public: + static int m_fn1(); + F reusable_preparser_; +}; +class D { +public: + D(int) : function_(0), context_(0), nested_scope_chain_(0) { G::m_fn1(); } + B function_; + B context_; + A nested_scope_chain_; +}; +void fn1() { D(0); } +} +} + +int main() +{ + return 0; +} diff --git a/gcc/testsuite/g++.dg/lto/pr63270_1.C b/gcc/testsuite/g++.dg/lto/pr63270_1.C new file mode 100644 index 0000000..a842e5c --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/pr63270_1.C @@ -0,0 +1,53 @@ +typedef unsigned long uintptr_t; +namespace v8 +{ + + int kPointerSize = 0; + + class Extension; + namespace internal + { + class Token; + class Scanner; + int kCodeOffset = 0; + int kOptimizedCodeMapOffset = 0; + int kScopeInfoOffset = 0; + + class FuncNameInferrer; + template < typename Traits > class ParserBase:Traits + { + class FunctionState; + bool parenthesized_function_; + typename Traits::Type::Scope * scope_; + FunctionState *function_state_; + v8::Extension * extension_; + FuncNameInferrer *fni_; + Scanner *scanner_; + uintptr_t stack_limit_; + bool stack_overflow_; + bool allow_lazy_; + bool allow_natives_syntax_; + bool allow_generators_; + bool allow_for_of_; + typename Traits::Type::Zone * zone_; + }; + class PreParserScope; + class PreParser; + class PreParserTraits + { + public:struct Type + { + typedef PreParserScope Scope; + typedef void Zone; + }; + PreParser *pre_parser_; + }; + class PreParser:ParserBase < PreParserTraits > + { + int ParseMemberWithNewPrefixesExpression ( bool * ); + }; + int PreParser::ParseMemberWithNewPrefixesExpression ( bool * ) + { + } + } +} |