aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/packed8.C
blob: a68fa2c8a41dcaf02e3151b15d3b97fa95cc209a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/18378

class A
{
public:
  int i;

  A() {}
  A(const A& a) { i = a.i; }
};

class B
{
  A a __attribute__((packed));

public:
  B() {}
  A GetA() { return a; } // { dg-error "" }
};