This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[testsuite] i386 reload issue
- To: gcc-patches at gcc dot gnu dot org
- Subject: [testsuite] i386 reload issue
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 24 Aug 2000 11:18:49 -0400
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
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