This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[testsuite] i386 reload issue


Hi!

In the following case on ia32, reload will replace a (mem:QI (reg) ) in a
call_value_1 with (mem:QI (const_int 0)) and the result is call *$0
which the assembler does not like at all.
Ok to commit?

2000-08-24  Jakub Jelinek  <jakub@redhat.com>

	* testsuite/g++.old-deja/g++.other/crash21.C: New test.

--- gcc/testsuite/g++.old-deja/g++.other/crash21.C.jj	Thu Aug 24 17:06:37 2000
+++ gcc/testsuite/g++.old-deja/g++.other/crash21.C	Thu Aug 24 17:07:05 2000
@@ -0,0 +1,56 @@
+// Build don't run:
+// Special g++ Options: -O2
+
+class foo
+{
+};
+
+typedef void *voidp;
+class vect : public foo
+{
+public:
+  voidp& a();
+  int b();
+};
+
+class bar
+{
+public:
+  bar *c(bool (*f)(bar *node), voidp g)
+    {
+      int i=0;
+      bool j;
+      while (i < d.b()){
+        j = (f == __null) || f((bar*)d.a());
+        if (j)
+          ((bar*)d.a())->c(f, g);
+        i++;
+      }
+      return this;
+    }
+ public:
+  vect d;
+  bar *e(foo *k);
+};
+
+bar *bar::e(foo *k)
+{
+  return c(__null, k);
+}
+
+voidp &vect::a()
+{
+  static voidp x;
+  return x;
+}
+
+int vect::b()
+{
+  static int x;
+  return x;
+}
+
+int main()
+{
+  return 0;
+}

	Jakub

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]