aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile
diff options
context:
space:
mode:
authorChen Gang <gang.chen.5i5j@gmail.com>2015-06-24 04:22:39 +0000
committerJeff Law <law@gcc.gnu.org>2015-06-23 22:22:39 -0600
commit5a5c3debfede40be3bdfd5c03a4dbb3ad2d6db21 (patch)
treebfbd85f955fc8b53c6aff06e405428d862f078fe /gcc/testsuite/gcc.c-torture/compile
parent6c4ed5216d64c1650d3438597f99cade69c163ca (diff)
downloadgcc-5a5c3debfede40be3bdfd5c03a4dbb3ad2d6db21.zip
gcc-5a5c3debfede40be3bdfd5c03a4dbb3ad2d6db21.tar.gz
gcc-5a5c3debfede40be3bdfd5c03a4dbb3ad2d6db21.tar.bz2
re PR target/65803 (blackfin: internal compiler error: segment fault linux kernel)
PR target/65803 * config/bfin/bfin.c (hwloop_optimize): Initialize JUMP_LABEL for newly created jump. PR target/65803 * gcc.c-torture/pr65803.c: New test. From-SVN: r224866
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr65803.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr65803.c b/gcc/testsuite/gcc.c-torture/compile/pr65803.c
new file mode 100644
index 0000000..57c6676
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr65803.c
@@ -0,0 +1,25 @@
+/* { dg-options "-fno-strict-overflow" } */
+typedef unsigned char __uint8_t;
+typedef __uint8_t uint8_t;
+typedef uint8_t u8_t;
+typedef struct ip_addr ip_addr_t;
+char *
+ipaddr_ntoa_r (const ip_addr_t * addr, char *buf, int buflen)
+{
+ char inv[3];
+ char *rp;
+ u8_t *ap;
+ u8_t n;
+ u8_t i;
+ int len = 0;
+ for (n = 0; n < 4; n++)
+ {
+ while (*ap);
+ while (i--)
+ {
+ if (len++ >= buflen)
+ return ((void *) 0);
+ *rp++ = inv[i];
+ } ap++;
+ }
+}