diff options
author | Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> | 2016-09-21 06:03:32 +0000 |
---|---|---|
committer | Senthil Kumar Selvaraj <saaadhu@gcc.gnu.org> | 2016-09-21 06:03:32 +0000 |
commit | 37d168aedcc08d271bf5546288be7ad18d4def5e (patch) | |
tree | c032895667336bd832042caef8518a642d23dabc | |
parent | 664540008bf3784a9b9995da0a1696d02c5ffea5 (diff) | |
download | gcc-37d168aedcc08d271bf5546288be7ad18d4def5e.zip gcc-37d168aedcc08d271bf5546288be7ad18d4def5e.tar.gz gcc-37d168aedcc08d271bf5546288be7ad18d4def5e.tar.bz2 |
Make integer size explicit
For the lower vrp bound to be 2/-2, unsigned ints must be 4 bytes wide. This
breaks targets like avr. Explicitly using __UINT32_TYPE__ (behind a typedef)
makes the testcase pass for all targets.
gcc/testsuite/ChangeLog:
2016-09-21 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/tree-ssa/pr64130.c: Use __UINT32_TYPE__ instead of int.
From-SVN: r240300
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr64130.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e05a76e..2f5518f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2016-09-21 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> + + * gcc.dg/tree-ssa/pr64130.c: Use __UINT32_TYPE__ instead of int. + 2016-09-21 Kugan Vivekanandarajah <kuganv@linaro.org> PR tree-optimization/72835 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr64130.c b/gcc/testsuite/gcc.dg/tree-ssa/pr64130.c index f39bd17..e068765 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr64130.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr64130.c @@ -2,12 +2,14 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-evrp" } */ -int funsigned (unsigned a) +__extension__ typedef __UINT32_TYPE__ uint32_t; + +int funsigned (uint32_t a) { return 0x1ffffffffL / a == 0; } -int funsigned2 (unsigned a) +int funsigned2 (uint32_t a) { if (a < 1) return 1; return (-1 * 0x1ffffffffL) / a == 0; |