OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [packed8.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// PR c++/18378
2
// NOTE: This test assumes packed structure layout differs from unpacked
3
//       structure layout.  This isn't true, e.g., with the default
4
//       arm-none-elf options.
5
// { dg-options "-mstructure-size-boundary=8" { target arm-*-* } }
6
 
7
class A
8
{
9
public:
10
  int i;
11
 
12
  A() {}
13
  A(const A& a) { i = a.i; }
14
};
15
 
16
class B
17
{
18
  A a __attribute__((packed)); // { dg-warning "attribute ignored" "" { target default_packed } }
19
 
20
public:
21
  B() {}
22
  A GetA() { return a; } // { dg-error "" "" { target { ! default_packed } } }
23
};
24
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.