aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr78952-2.c
blob: 18230f140e2d288349a7ca97ecf50419cf0c0705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* PR target/78952 */
/* { dg-do compile } */
/* { dg-options "-O2 -masm=att" } */
/* { dg-additional-options "-mregparm=3" { target ia32 } } */
/* { dg-final { scan-assembler-not "sarl" } } */

struct S1
{
  char pad1;
  char val;
  short pad2;
};

struct S1 foo (struct S1 a, int b)
{
  a.val = b >> 8;

  return a;
}

/* { dg-final { scan-assembler "\[ \t\]movb\[ \t\]+%.h, %.h" } } */