aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/ext_ins.c
blob: 8186b84a27f21e68813406ec83feb8fd13962567 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do compile } */
/* { dg-options "isa_rev>=2" } */
/* { dg-final { scan-assembler "ext" } } */
/* { dg-final { scan-assembler "ins" } } */

struct A 
{
  unsigned int i : 2;
  unsigned int j : 3;
  unsigned int k : 4;
  unsigned int l : 5;
};

void func (struct A);

unsigned int f1 (struct A a)
{
  return a.j;
}

void f2 (int i)
{
  struct A c;
  c.j = i;
  func (c);
}