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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [conversion/] [bitfield10.C] - Blame information for rev 715

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/38007
2
// We need to use the conversion function to the declared type of a bitfield,
3
// not the lowered bitfield type.
4
// { dg-do link }
5
 
6
struct A
7
{
8
  operator unsigned int() { return 42; }
9
  operator unsigned char();
10
};
11
 
12
struct B
13
{
14
  unsigned int b : 8;
15
};
16
 
17
int
18
main ()
19
{
20
  A u;
21
  unsigned int v = u;
22
  B w;
23
  w.b = u;
24
}

powered by: WebSVN 2.1.0

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