This is the test I was talking would potentially fail with our current implementation. And ...
13 years, 8 months ago
(2011-08-05 22:49:33 UTC)
#1
This is the test I was talking would potentially fail with our current
implementation.
And it does.
It has an assembly difference in the order of the global variables, like we used
to have in simpler tests.
Gab
2011-08-05 Gabriel Charette <gchare@google.com>
* (x0hardorder1.h): New.
* (x3hardorder2.h): New.
* (x3hardorder.cc): New.
diff --git a/gcc/testsuite/g++.dg/pph/x0hardorder1.h
b/gcc/testsuite/g++.dg/pph/x0hardorder1.h
new file mode 100644
index 0000000..bfb547e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pph/x0hardorder1.h
@@ -0,0 +1,13 @@
+#ifndef HARD_ORDER_1_H
+#define HARD_ORDER_1_H
+
+int a1 = 1;
+
+namespace N {
+ int n1 = 1;
+ int m1 = 2;
+}
+
+float b1 = 1.1;
+
+#endif
diff --git a/gcc/testsuite/g++.dg/pph/x3hardorder.cc
b/gcc/testsuite/g++.dg/pph/x3hardorder.cc
new file mode 100644
index 0000000..8f62539
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pph/x3hardorder.cc
@@ -0,0 +1,8 @@
+//pph asm xdiff 28345
+//Ordering of globals is different
+
+#include "x3hardorder2.h"
+
+int test () {
+ return a1 + a2 - b1 + b2 * N::n1 + N::n2 - N::m1 + N::m2;
+}
diff --git a/gcc/testsuite/g++.dg/pph/x3hardorder2.h
b/gcc/testsuite/g++.dg/pph/x3hardorder2.h
new file mode 100644
index 0000000..d534ae4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pph/x3hardorder2.h
@@ -0,0 +1,18 @@
+#ifndef HARD_ORDER_2_H
+#define HARD_ORDER_2_H
+
+int a2 = 2;
+
+namespace N {
+ int n2 = 3;
+}
+
+#include "x0hardorder1.h"
+
+float b2 = 2.2;
+
+namespace N {
+ int m2 = 3;
+}
+
+#endif
--
This patch is available for review at http://codereview.appspot.com/4854042
On Fri, Aug 5, 2011 at 18:49, Gabriel Charette <gchare@google.com> wrote: > This is the ...
13 years, 8 months ago
(2011-08-08 16:03:53 UTC)
#2
On Fri, Aug 5, 2011 at 18:49, Gabriel Charette <gchare@google.com> wrote:
> This is the test I was talking would potentially fail with our current
implementation.
>
> And it does.
>
> It has an assembly difference in the order of the global variables, like we
used to have in simpler tests.
>
> Gab
>
> 2011-08-05 Gabriel Charette <gchare@google.com>
>
> * (x0hardorder1.h): New.
> * (x3hardorder2.h): New.
> * (x3hardorder.cc): New.
OK. Thanks for the test.
Diego.
Issue 4854042: [pph] Adding one hard and failing ordering test
(Closed)
Created 13 years, 8 months ago by Gabriel Charette
Modified 13 years, 8 months ago
Reviewers: Lawrence Crowl, Diego Novillo
Base URL:
Comments: 0