]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/64905 (unsigned short is loaded with 4-byte load (movl))
authorUros Bizjak <ubizjak@gmail.com>
Thu, 5 Feb 2015 10:37:05 +0000 (11:37 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 5 Feb 2015 10:37:05 +0000 (11:37 +0100)
PR rtl-optimization/64905
* gcc.target/i386/pr64905.c: Require nonpic target.
(dg-options): Add -fomit-frame-pointer.
(main): Remove.

From-SVN: r220441

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr64905.c

index 9c49ed5956d99c812370a6bdacca838b54570d14..b7be54e7bc3d3fe0e63a0815710c7c16411aa370 100644 (file)
@@ -1,3 +1,10 @@
+2015-02-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR rtl-optimization/64905
+       * gcc.target/i386/pr64905.c: Require nonpic target.
+       (dg-options): Add -fomit-frame-pointer.
+       (main): Remove.
+
 2014-02-05  James Greenhalgh  <james.greenhalgh@arm.com>
 
        * gcc.dg/tree-ssa/foldconst-6.c: Change expected pattern for
index bc87d8549286d283d89a449f87c77171b431b9c2..024a89458051af11d3b046fe4f6bacecfb015d8e 100644 (file)
@@ -1,22 +1,13 @@
-/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-Os -ffixed-rax -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rdi -ffixed-rsi -ffixed-r8 -ffixed-r9 -ffixed-r10 -ffixed-r11 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15" } */
+/* { dg-do compile { target { { ! ia32 } && nonpic } } } */
+/* { dg-options "-Os -fomit-frame-pointer -ffixed-rax -ffixed-rbx -ffixed-rcx -ffixed-rdx -ffixed-rdi -ffixed-rsi -ffixed-r8 -ffixed-r9 -ffixed-r10 -ffixed-r11 -ffixed-r12 -ffixed-r13 -ffixed-r14 -ffixed-r15" } */
 /* { dg-final { scan-assembler-not "movl\[ \t\]0\\(%.*\\), %.*" } } */
 
 typedef unsigned short uint16_t;
 uint16_t a_global;
 
-void __attribute__ ((noinline))
+void
 function (uint16_t **a_p)
 {
   // unaligned access by address in %rbp: mov    0x0(%rbp),%ebp
   a_global = **a_p;
 }
-
-int main(int argc, char **argv)
-{
-  uint16_t array [4] = { 1, 2, 3, 4 };
-  uint16_t *array_elem_p = &array [3];
-
-  function (&array_elem_p);
-  return 0;
-}