aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr95126-m32-2.c
blob: f4d9123a7680078a9815635258eff507cedc22fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile { target { ia32 } } } */
/* { dg-options "-O2" } */

struct small{ short a,b; signed char c; };
static const struct small s = { 1,2,0 };
extern int func(struct small X);

void call_func(void)
{
  func(s);
}

/* The @GOTOFF addressing seems to prevent the optimization of the loads to
   known constants.  */
/* { dg-final { scan-assembler "movl\[ \\t]*\\\$" { xfail { ! nonpic } } } } */
/* { dg-final { scan-assembler "movb\[ \\t]*\\\$0, " { xfail { ! nonpic } } } } */
/* { dg-final { scan-assembler-not "movzwl" { xfail { ! nonpic } } } } */