diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-11 11:13:27 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-11 11:13:27 +0000 |
commit | c41143fb1d63596ff2a0f6da741b4bae73b8be16 (patch) | |
tree | d70c0763693cfef7bc877f21e079986944261a5f /gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c | |
parent | eb0badc13724022c8828a55e516d0eecdc487cc3 (diff) | |
download | gcc-c41143fb1d63596ff2a0f6da741b4bae73b8be16.tar.gz |
2011-05-11 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 173647 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@173652 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c index 2cf245460ee..8120dad7fe9 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c @@ -3,24 +3,26 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ -void blas (char xxx); +void blas (signed char xxx); void blau (unsigned char xxx); void tst(void) { unsigned i; - for (i = 0; i < 128; i++) /* This cast to char has to be preserved. */ - blas ((char) i); - for (i = 0; i < 127; i++) /* And this one does not. */ - blas ((char) i); - for (i = 0; i < 255; i++) /* This cast is not necessary. */ + for (i = 0; i < 129; i++) /* This truncation to char has to be preserved. */ + blas ((signed char) i); + for (i = 0; i < 128; i++) /* This one is not necessary, but nothing eliminates it. */ + blas ((signed char) i); + for (i = 0; i < 127; i++) /* This one is not necessary, IVOPTS eliminates it. */ + blas ((signed char) i); + for (i = 0; i < 256; i++) /* This one is not necessary, VRP eliminates it. */ + blau ((unsigned char) i); + for (i = 0; i < 257; i++) /* This one is necessary. */ blau ((unsigned char) i); - for (i = 0; i < 256; i++) - blau ((unsigned char) i); /* This one is necessary. */ } -/* { dg-final { scan-tree-dump-times "= \\(unsigned char\\)" 1 "optimized" } } */ -/* { dg-final { scan-tree-dump-times "= \\(char\\)" 1 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "& 255" 1 "optimized" } } */ +/* { dg-final { scan-tree-dump-times "= \\(signed char\\)" 2 "optimized" } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */ |