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]

[tree-ssa] "fix"


If I'm reading things properly, the way vops are set up at present
before the alias pass, we'll mark the asm as ann->has_volatile_ops
and afterward we'll set the proper vops.  Which is fine, but it
does mean that we're looking in the wrong place for the test.
Also, we'll emit a VDEF not a VUSE, because the memory clobber
does in fact imply that X has been modified.

Also rewrite the test a bit to avoid x86-specific constructs.


r~


        * gcc.dg/tree-ssa/20031015-1.c: Rewrite for all targets.  Look at
        alias dump for two VDEFs.

Index: gcc.dg/tree-ssa/20031015-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20031015-1.c,v
retrieving revision 1.1.2.3
diff -c -p -d -u -r1.1.2.3 20031015-1.c
--- gcc.dg/tree-ssa/20031015-1.c	12 Jan 2004 23:37:50 -0000	1.1.2.3
+++ gcc.dg/tree-ssa/20031015-1.c	6 May 2004 21:46:22 -0000
@@ -1,15 +1,16 @@
-/* With tree-ssa, gcc.dg/20000724-1.c fails because we miss a VUSE
-   of x in the asm statement.  */
-/* { dg-do compile { target i?86-*-* } } */
-/* { dg-options "-O1 -fdump-tree-ssa-vops" } */
-struct s {
-  int a;
-};
+/* With tree-ssa, gcc.dg/20000724-1.c failed because we missed
+   a VOP of x in the asm statement.  */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-alias-vops" } */
+
+struct s { int a; };
+
 int
 main(void)
 {
   struct s x = { 0 };
-  asm volatile ("call ___checkme" : : "c" (&x) : "memory");
+  asm volatile ("" : : "r" (&x) : "memory");
   return 0;
 }
-/* { dg-final { scan-tree-dump-times "VUSE " 1 "ssa"} } */
+
+/* { dg-final { scan-tree-dump-times "VDEF" 2 "alias" } } */


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