From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gcc.c-torture/compile/20001226-1.c | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/20001226-1.c (limited to 'gcc/testsuite/gcc.c-torture/compile/20001226-1.c') diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c new file mode 100644 index 000000000..8c93baccd --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c @@ -0,0 +1,37 @@ +/* This does not assemble on m68hc11 because the function is larger + than 64K. */ +/* { dg-do assemble } */ +/* { dg-xfail-if "function larger than 64K" { m6811-*-* } { "*" } { "" } } */ +/* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */ +/* { dg-skip-if "too much code for pdp11" { "pdp11-*-*" } { "*" } { "" } } */ +/* { dg-xfail-if "jump beyond 128K not supported" { xtensa*-*-* } { "-O0" } { "" } } */ +/* { dg-xfail-if "PR36698" { spu-*-* } { "-O0" } { "" } } */ +/* { dg-skip-if "" { m32c-*-* } { "*" } { "" } } */ +/* { dg-timeout-factor 4.0 } */ + +/* This testcase exposed two branch shortening bugs on powerpc. */ + +#define C(a,b) \ + if (a > b) goto gt; \ + if (a < b) goto lt; + +#define C4(x,b) C((x)[0], b) C((x)[1],b) C((x)[2],b) C((x)[3],b) +#define C16(x,y) C4(x, (y)[0]) C4(x, (y)[1]) C4(x, (y)[2]) C4(x, (y)[3]) + +#define C64(x,y) C16(x,y) C16(x+4,y) C16(x+8,y) C16(x+12,y) +#define C256(x,y) C64(x,y) C64(x,y+4) C64(x,y+8) C64(x,y+12) + +#define C1024(x,y) C256(x,y) C256(x+16,y) C256(x+32,y) C256(x+48,y) +#define C4096(x,y) C1024(x,y) C1024(x,y+16) C1024(x,y+32) C1024(x,y+48) + +unsigned foo(int x[64], int y[64]) +{ + C4096(x,y); + + return 0x01234567; + gt: + return 0x12345678; + lt: + return 0xF0123456; +} + -- cgit v1.2.3