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] New test and test update


20030917-1.c is a test for the CCP bug I fixed yesterday.  

20030807-8.c needed an update -- we no longer output the AT_loc_list function,
so we no longer need to account for the IF conditional which appeared in
that function.

	* gcc.dg/tree-ssa/20030917-1.c: New test.

	* gcc.dg/tree-ssa/20030807-8.c: Update.

Index: gcc.dg/tree-ssa/20030807-8.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/Attic/20030807-8.c,v
retrieving revision 1.1.2.1
diff -c -3 -p -r1.1.2.1 20030807-8.c
*** gcc.dg/tree-ssa/20030807-8.c	13 Aug 2003 21:41:35 -0000	1.1.2.1
--- gcc.dg/tree-ssa/20030807-8.c	17 Sep 2003 16:43:19 -0000
*************** output_location_lists (die)
*** 48,53 ****
        output_loc_list (AT_loc_list (d_attr));
  }
  
! /* There should be exactly two IF conditionals, one in the AT_loc_list
!    function and another in output_location_lists.  */
! /* { dg-final { scan-tree-dump-times "if " 2 "ssa"} } */
--- 48,52 ----
        output_loc_list (AT_loc_list (d_attr));
  }
  
! /* There should be exactly one IF conditional, in output_location_lists.  */
! /* { dg-final { scan-tree-dump-times "if " 1 "ssa"} } */
Index: gcc.dg/tree-ssa/20030917-1.c
===================================================================
RCS file: gcc.dg/tree-ssa/20030917-1.c
diff -N gcc.dg/tree-ssa/20030917-1.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- gcc.dg/tree-ssa/20030917-1.c	17 Sep 2003 16:43:19 -0000
***************
*** 0 ****
--- 1,20 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O1 -fdump-tree-ccp" } */
+   
+ 
+ extern int board[];
+ 
+ void
+ findbestextension (int blah, int blah2)
+ {
+   int defval;
+   defval = def_val (board[blah2]);
+   if (blah)
+     defval = 0;
+   foo (defval);
+ }
+ 
+ /* The argument to "foo" should be a variable, not a constant.  */
+ /* { dg-final { scan-tree-dump-times "foo .defval" 1 "ccp"} } */
+  
+ 





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