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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [union1.C] - Diff between revs 154 and 816

Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
// { dg-do run }
// { dg-do run }
extern "C" void abort ();
extern "C" void abort ();
void g (char c)
void g (char c)
{
{
  if (c != 'a')
  if (c != 'a')
    abort ();
    abort ();
}
}
void h (int i)
void h (int i)
{
{
  if (i != 3)
  if (i != 3)
    abort ();
    abort ();
}
}
template  void f(T const &t)
template  void f(T const &t)
{
{
    union { char c; T t_; };
    union { char c; T t_; };
    c = 'a';
    c = 'a';
    g (c);
    g (c);
    t_ = 3;
    t_ = 3;
    h (t_);
    h (t_);
}
}
int main () {
int main () {
  f (3);
  f (3);
}
}
 
 

powered by: WebSVN 2.1.0

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