* gcc.dg/tree-ssa/pr21985.c: Use size_t.

From-SVN: r101196
This commit is contained in:
Richard Henderson 2005-06-19 16:59:55 -07:00 committed by Richard Henderson
parent 7f7b17185b
commit 771151dc46
2 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2005-06-19 Richard Henderson <rth@redhat.com>
* gcc.dg/tree-ssa/pr21985.c: Use size_t.
2005-06-19 Joseph S. Myers <joseph@codesourcery.com>
* g++.dg/abi/mangle24.C, g++.dg/abi/mangle25.C: New tests.

View File

@ -10,20 +10,21 @@ struct
} a[100];
} a;
void foo(unsigned);
unsigned *bar (void);
typedef __SIZE_TYPE__ size_t;
void foo(size_t);
size_t *bar (void);
int
main (void)
{
unsigned *b = bar ();
size_t *b = bar ();
/* This should be folded. */
foo (&a.a[50].a - &a.a[33].b);
foo ((unsigned) &a.a[50].b - (unsigned) &a);
foo ((size_t) &a.a[50].b - (size_t) &a);
/* And this should not. */
foo ((unsigned) &b - (unsigned) b);
foo ((size_t) &b - (size_t) b);
return 0;
}