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]
Other format: [Raw text]

Re: [PATCH] Fix invalid ssa-pta-fn-1.c testcase


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; }


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