From c661ca7956246394a9e440d14d5e57a195cc6eb9 Mon Sep 17 00:00:00 2001 From: Oleg Endo Date: Thu, 10 Sep 2015 14:53:48 +0000 Subject: [PATCH] re PR target/67506 ([SH]: error: unrecognizable insn when compiling texlive-binaries) gcc/ PR target/67506 * config/sh/sh.c (sh_extending_set_of_reg::use_as_extended_reg): Add missing simplify_gen_subreg. gcc/testsuite/ PR target/67506 * gcc.c-torture/compile/pr67506.c: New test. From-SVN: r227646 --- gcc/ChangeLog | 6 +++ gcc/config/sh/sh.c | 3 ++ gcc/testsuite/ChangeLog | 5 ++ gcc/testsuite/gcc.c-torture/compile/pr67506.c | 53 +++++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr67506.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14e8f5eeee0..67367eb8939 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-09-10 Oleg Endo + + PR target/67506 + * config/sh/sh.c (sh_extending_set_of_reg::use_as_extended_reg): Add + missing simplify_gen_subreg. + 2015-09-10 Andreas Krebbel * config/s390/s390.c (s390_contiguous_bitmask_vector_p): Reject if diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 1442b7fc790..25149a60ff7 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -14016,6 +14016,9 @@ sh_extending_set_of_reg::use_as_extended_reg (rtx_insn* use_at_insn) const else { rtx extension_dst = XEXP (set_rtx, 0); + if (GET_MODE (extension_dst) != SImode) + extension_dst = simplify_gen_subreg (SImode, extension_dst, + GET_MODE (extension_dst), 0); if (modified_between_p (extension_dst, insn, use_at_insn)) { if (dump_file) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index aee33f62db0..844e2a105ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-09-10 Oleg Endo + + PR target/67506 + * gcc.c-torture/compile/pr67506.c: New test. + 2015-09-10 Andreas Krebbel * gcc.target/s390/vector/vec-genbytemask-1.c: Add check for V1TI diff --git a/gcc/testsuite/gcc.c-torture/compile/pr67506.c b/gcc/testsuite/gcc.c-torture/compile/pr67506.c new file mode 100644 index 00000000000..2826d0b3aa7 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr67506.c @@ -0,0 +1,53 @@ +extern struct _IO_FILE *stderr; +typedef long integer; +typedef unsigned char byte; +short nl; +byte * tfmfilearray; +integer charbase, ligkernbase; +unsigned char charsonline; +short c; +unsigned short r; +struct { + short cc; + integer rr; +} labeltable[259]; +short sortptr; +unsigned char activity[(32510) + 1]; +integer ai, acti; +extern void _IO_putc (char, struct _IO_FILE *); + +void +mainbody (void) +{ + register integer for_end; + if (c <= for_end) + do { + if (((tfmfilearray + 1001)[4 * (charbase + c) + 2] % 4) == 1) + { + if ( r < nl ) + ; + else + { + while (labeltable[sortptr ].rr > r) + labeltable[sortptr + 1 ]= labeltable[sortptr]; + } + } + } while (c++ < for_end); + + if (ai <= for_end) + do { + if (activity[ai]== 2) + { + r = (tfmfilearray + 1001)[4 * (ligkernbase + (ai))]; + if (r < 128) + { + r = r + ai + 1 ; + if (r >= nl) + { + if (charsonline > 0) + _IO_putc ('\n', stderr); + } + } + } + } while (ai++ < for_end); +} -- 2.30.2