summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/conversion/bitfield9.C
blob: 998dd4873c84ef2dd1fcb0d25b220d2dfcf85d5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/35909
// { dg-do compile }

struct MidiCommand
{
  unsigned data1 : 8;
};

void g(const unsigned char &);
void h(const unsigned int &);

void f(MidiCommand mc)
{
  g(mc.data1);
  h(mc.data1);
}