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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/35056
2
// { dg-do compile }
3
// { dg-options "-O2" }
4
 
5
enum EBorderStyle { bla = 1 };
6
inline bool compare_ref(const unsigned int &t, const EBorderStyle &u)
7
{ return t == u; }
8
inline bool compare_val(const unsigned int t, const EBorderStyle u)
9
{ return t == u; }
10
struct S {
11
  unsigned m_style : 4;
12
};
13
void call_ref (S *s, EBorderStyle v)
14
{ if (!compare_ref(s->m_style, v)) s->m_style = v; }
15
void call_val (S *s, EBorderStyle v)
16
{ if (!compare_val(s->m_style, v)) s->m_style = v; }

powered by: WebSVN 2.1.0

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