From: mzakirov Date: Fri, 11 Jul 2014 09:02:39 +0000 (+0000) Subject: gcc/ 2014-07-11 Marat Zakirov X-Git-Tag: accepted/tizen/base/20160805.171139~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=994d6776aeeb8be4438c126805ea21218845ff09;p=platform%2Fupstream%2Flinaro-gcc.git gcc/ 2014-07-11 Marat Zakirov PR target/61561 * config/arm/arm.md (*movhi_insn_arch4): Handle stack pointer. (*movhi_bytes): Likewise. (*arm_movqi_insn): Likewise. gcc/testsuite/ 2014-07-11 Marat Zakirov PR target/61561 * gcc.dg/pr61561.c: New test. Change-Id: I977cff643e5fa4b119a3c662510bdf7664d8a2e6 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212450 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index fd5024d..ea603ab 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -6997,7 +6997,7 @@ ;; Pattern to recognize insn generated default case above (define_insn "*movhi_insn_arch4" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,m,r") - (match_operand:HI 1 "general_operand" "rI,K,n,r,mi"))] + (match_operand:HI 1 "general_operand" "rIk,K,n,r,mi"))] "TARGET_ARM && arm_arch4 && (register_operand (operands[0], HImode) @@ -7024,7 +7024,7 @@ (define_insn "*movhi_bytes" [(set (match_operand:HI 0 "s_register_operand" "=r,r,r") - (match_operand:HI 1 "arm_rhs_operand" "I,r,K"))] + (match_operand:HI 1 "arm_rhs_operand" "I,rk,K"))] "TARGET_ARM" "@ mov%?\\t%0, %1\\t%@ movhi @@ -7156,7 +7156,7 @@ (define_insn "*arm_movqi_insn" [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,l,r,l,Uu,r,m") - (match_operand:QI 1 "general_operand" "r,r,I,Py,K,Uu,l,m,r"))] + (match_operand:QI 1 "general_operand" "rk,rk,I,Py,K,Uu,l,m,r"))] "TARGET_32BIT && ( register_operand (operands[0], QImode) || register_operand (operands[1], QImode))" diff --git a/gcc/testsuite/gcc.dg/pr61561.c b/gcc/testsuite/gcc.dg/pr61561.c new file mode 100644 index 0000000..1512f20 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr61561.c @@ -0,0 +1,15 @@ +/* PR c/61561. */ +/* { dg-do assemble } */ +/* { dg-options " -w -O2" } */ + +int dummy (int a); + +char a; +short b; + +void mmm (void) +{ + char dyn[dummy (3)]; + a = (char)&dyn[0]; + b = (short)&dyn[0]; +}