From 27d16306413f2e6f5eb3471db9593666c35694e3 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 5 Feb 2015 11:37:05 +0100 Subject: [PATCH] re PR rtl-optimization/64905 (unsigned short is loaded with 4-byte load (movl)) 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 | 7 +++++++ gcc/testsuite/gcc.target/i386/pr64905.c | 15 +++------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9c49ed5956d..b7be54e7bc3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-02-05 Uros Bizjak + + 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 * gcc.dg/tree-ssa/foldconst-6.c: Change expected pattern for diff --git a/gcc/testsuite/gcc.target/i386/pr64905.c b/gcc/testsuite/gcc.target/i386/pr64905.c index bc87d854928..024a8945805 100644 --- a/gcc/testsuite/gcc.target/i386/pr64905.c +++ b/gcc/testsuite/gcc.target/i386/pr64905.c @@ -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; -} -- 2.30.2