This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix invalid ssa-pta-fn-1.c testcase
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Jul 2009 14:57:44 +0200 (CEST)
- Subject: Re: [PATCH] Fix invalid ssa-pta-fn-1.c testcase
- References: <alpine.LNX.2.00.0907081438320.16347@zhemvz.fhfr.qr>
On Wed, 8 Jul 2009, Richard Guenther wrote:
>
> Tested on x86_64-unknown-linux-gnu, applied to trunk.
Actually a volatile read makes the function not pure, so I adjusted
it to the following.
2009-07-08 Richard Guenther <rguenther@suse.de>
* gcc.dg/torture/ssa-pta-fn-1.c: Fix invalid testcase.
Index: gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c (revision 149367)
+++ gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c (working copy)
@@ -4,13 +4,13 @@
extern void abort (void);
int *glob;
-volatile int dummy;
+int dummy;
int * __attribute__((noinline,const))
foo_const(int *p) { return p; }
int * __attribute__((noinline,pure))
-foo_pure(int *p) { dummy; return p; }
+foo_pure(int *p) { return p + dummy; }
int * __attribute__((noinline))
foo_normal(int *p) { glob = p; return p; }