This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[testcase] GCSE failure on 3.0 branch
- To: rth at redhat dot com, Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: [testcase] GCSE failure on 3.0 branch
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 12 Sep 2001 09:49:29 -0400
- Cc: gcc-patches at gcc dot gnu dot org, Stan Shebs <shebs at apple dot com>
- References: <200109111847.f8BIlVg08449@mail.redhat.com> <20010911181023.I25384@devserv.devel.redhat.com> <200109112304.f8BN4ag28911@mail.redhat.com>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Wed, Sep 12, 2001 at 01:04:53AM +0200, Franz Sirl wrote:
> Try the testcase in PR3387, it got miscompiled on x86 with the branch and is
> fixed with your patch. Should be easy to turn it into an executable testcase
> for gcc.dg.
Here it is, ok to commit branch/head?
Also, ok to commit
2001-04-20 Jakub Jelinek <jakub@redhat.com>
* gcse.c (gcse_main): Fix comment typo.
(delete_null_pointer_check): Likewise.
(hash_scan_set): Don't consider sets with REG_EQUIV MEM notes.
* cse.c (cse_insn): Likewise.
* function.c (fixup_var_refs_insns_with_hash): The sequence is
toplevel.
patch to branch which fixes it?
2001-09-12 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20010912-1.c: New test.
--- gcc/testsuite/gcc.dg/20010912-1.c.jj Fri Feb 16 21:16:31 2001
+++ gcc/testsuite/gcc.dg/20010912-1.c Wed Sep 12 15:40:33 2001
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fpic" } */
+
+extern void abort (void);
+extern void exit (int);
+
+int bar (int x, char **y)
+{
+ if (x != 56)
+ abort ();
+ if (**y != 'a')
+ abort ();
+ *y = "def";
+ return 1;
+}
+
+int baz (int x, char **y)
+{
+ if (x != 56)
+ abort ();
+ if (**y != 'a')
+ abort ();
+ return 26;
+}
+
+int foo (int x, char *y)
+{
+ int a;
+ char *b = y;
+ a = bar (x, &y);
+ if (a)
+ {
+ y = b;
+ a = baz (x, &y);
+ }
+ if (a)
+ return a;
+
+ baz (x, &y);
+ return 0;
+}
+
+int main ()
+{
+ if (foo (56, "abc") != 26)
+ abort ();
+ exit (0);
+}
Jakub