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] More testsuite updates



	* gcc.dg/tree-ssa/20030708-1.c: There should only be one conditional.
	* gcc.dg/tree-ssa/20030714-2.c: New test.
	* gcc.dg/tree-ssa/20030731-1.c: New test.

Index: 20030708-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030708-1.c,v
retrieving revision 1.1.2.2
diff -c -3 -p -r1.1.2.2 20030708-1.c
*** 20030708-1.c	12 Aug 2003 17:42:34 -0000	1.1.2.2
--- 20030708-1.c	14 Aug 2003 20:33:31 -0000
*************** nonlocal_mentioned_p (x)
*** 35,41 ****
     more than one, then the dominator optimizations failed.  */
  /* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 1 "ssa"} } */
                                                                               

! /* There should be two IF conditionals.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "ssa"} } */
                                                                               

  
--- 35,41 ----
     more than one, then the dominator optimizations failed.  */
  /* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 1 "ssa"} } */
                                                                               

! /* There should be one IF conditional.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
                                                                               

  
Index: 20030714-2.c
===================================================================
RCS file: 20030714-2.c
diff -N 20030714-2.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- 20030714-2.c	14 Aug 2003 20:33:31 -0000
***************
*** 0 ****
--- 1,39 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O1 -fdump-tree-ssa" } */
+    
+ 
+ union tree_node;
+ typedef union tree_node *tree;
+ extern const char tree_code_type[];
+ struct tree_common
+ {
+   int code;
+   tree type;
+ };
+ struct tree_exp
+ {
+   tree operands[1];
+ };
+ union tree_node
+ {
+   struct tree_common common;
+   struct tree_exp exp;
+ };
+ long
+ get_alias_set (t)
+      tree t;
+ {
+   if (tree_code_type[t->common.code] != 't' && t->common.type == 0)
+     return 0;
+   if (tree_code_type[t->common.code] != 't')
+     {
+       while (t->exp.operands[0])
+         t = t->exp.operands[0];
+     }
+ }
+ 
+ /* There should be exactly three IF conditionals if we thread jumps
+    properly.  */
+ /* { dg-final { scan-tree-dump-times "if " 3 "ssa"} } */
+  
+ 
Index: 20030731-1.c
===================================================================
RCS file: 20030731-1.c
diff -N 20030731-1.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- 20030731-1.c	14 Aug 2003 20:33:31 -0000
***************
*** 0 ****
--- 1,62 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O1 -fdump-tree-ssa" } */
+   
+ 
+ struct rtx_def;
+ typedef struct rtx_def *rtx;
+ struct rtvec_def;
+ typedef struct rtvec_def *rtvec;
+ union tree_node;
+ typedef union tree_node *tree;
+ struct rtx_def
+ {
+   int code;
+   int mode;
+   unsigned int in_struct:1;
+ };
+ struct tree_common
+ {
+   int code;
+ };
+ struct tree_decl
+ {
+   rtx rtl;
+ };
+ union tree_node
+ {
+   struct tree_common common;
+   struct tree_decl decl;
+ };
+ rtx
+ store_expr (exp, target, want_value)
+      tree exp;
+      rtx target;
+      int want_value;
+ {
+   if (exp->common.code == 42)
+     abort ();
+   else if (queued_subexp_p (target))
+     {
+       blah (target->mode);
+       if (target->code)
+         abort ();
+     }
+   else
+     {
+       if (target->code && (__extension__({target;})->in_struct));
+     }
+ 
+   if ((target != (exp->decl.rtl
+ 		  ? (exp->decl.rtl
+ 		     ? exp->decl.rtl
+ 		     : (make_decl_rtl (exp, 0), exp->decl.rtl))
+ 		  : 0))
+       && expr_size (exp))
+     ;
+ }
+ 
+ /* All paths to the test "target != 0" occuring in the final IF statement
+    dereference target.  Thus target can not have the value zero at that
+    point and the test should have been eliminated.  */
+ /* { dg-final { scan-tree-dump-times "target.*!= 0" 0 "ssa"} } */
+ 




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