public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR LTO/63270 - new test
@ 2014-09-19 15:45 Martin Liška
  2014-09-19 16:20 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2014-09-19 15:45 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]

Hello.

The following patch adds a test for PR/63270. The test has been tested before and with r215328, where the bug was fixed.

Thank you,
Martin

[-- Attachment #2: pr63270.changelog --]
[-- Type: text/plain, Size: 158 bytes --]

gcc/testsuite/ChangeLog:

2014-09-19  Martin Liska  <mliska@suse.cz>

	PR LTO/63270
	* g++.dg/lto/pr63270_0.C: New test.
	* g++.dg/lto/pr63270_1.C: New test.

[-- Attachment #3: pr63270.patch --]
[-- Type: text/x-patch, Size: 3081 bytes --]

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 * )
+    {
+    }
+  }
+}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PR LTO/63270 - new test
  2014-09-19 15:45 [PATCH] PR LTO/63270 - new test Martin Liška
@ 2014-09-19 16:20 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2014-09-19 16:20 UTC (permalink / raw)
  To: Martin Liška, GCC Patches

On 09/19/14 09:48, Martin Liška wrote:
> Hello.
>
> The following patch adds a test for PR/63270. The test has been tested before and with r215328, where the bug was fixed.
>
> Thank you,
> Martin
>
>
> pr63270.changelog
>
>
> gcc/testsuite/ChangeLog:
>
> 2014-09-19  Martin Liska<mliska@suse.cz>
>
> 	PR LTO/63270
> 	* g++.dg/lto/pr63270_0.C: New test.
> 	* g++.dg/lto/pr63270_1.C: New test.
OK.  Please install if you haven't done so already.

Thanks,
Jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-19 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-19 15:45 [PATCH] PR LTO/63270 - new test Martin Liška
2014-09-19 16:20 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).