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: [tree-ssa] New testcases


Can you please also consider the testcase below too? 

It's called ssa-ccp-9.c because there are 8 other tests that were
approved by Diego some time ago 
(http://gcc.gnu.org/ml/gcc-patches/2003-06/msg01802.html)
I don't have CVS write access, so I cannot check them in. 

I attach those 8 testcases here too, in case somebody with CVS write
access wants to check them in...


2003-07-15  Dan Nicolaescu  <dann@ics.uci.edu>

	* gcc.dg/tree-ssa/ssa-ccp-9.c: New test.	



/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-ccp" } */

/* Check that cprop works for assignments to array elements and structs.  */

struct foo {
  int a;
};

extern void link_error (void);

void
test9 (struct foo f)
{
  f.a = 0;
  if (f.a != 0)
    link_error ();
}

void
test99 (struct foo *f)
{
  f->a = 0;
  if (f->a != 0)
    link_error ();
}

void
test999 (int *arr)
{
  *arr = 0;
  if (*arr != 0)
    link_error ();
}

void
test9999 (int *arr)
{
  arr[13] = 0;
  if (arr[13] != 0)
    link_error ();
}

void
test99999 (int *arr, int j)
{
  arr[j] = 0;
  if (arr[j] != 0)
    link_error ();
}

/* There should be no link_error calls, if there is any, the
   optimization has failed */
/* { dg-final { scan-tree-dump-times "link_error" 0 "ccp"} } */



2003-07-15  Dan Nicolaescu  <dann@ics.uci.edu>

	* gcc.dg/tree-ssa/ssa-ccp-1.c: New test.
	* gcc.dg/tree-ssa/ssa-ccp-2.c: New test.
	* gcc.dg/tree-ssa/ssa-ccp-3.c: New test.
	* gcc.dg/tree-ssa/ssa-ccp-4.c: New test.
	* gcc.dg/tree-ssa/ssa-ccp-5.c: New test.
	* gcc.dg/tree-ssa/ssa-ccp-6.c: New test.
	* gcc.dg/tree-ssa/ssa-ccp-7.c: New test.
	* gcc.dg/tree-ssa/ssa-ccp-8.c: New test.	

Attachment: tree-ssa-tests.tar.gz
Description: Binary data


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