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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [variadic80.C] - Blame information for rev 307

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

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/31434
2
// { dg-do run }
3
// { dg-options "-std=c++0x" }
4
 
5
extern "C" void abort ();
6
 
7
template inline int foo (const T...) { return 1; }
8
template inline int foo (const T *...) { return 2; }
9
 
10
void
11
bar (int *a)
12
{
13
  a[0] = foo (0);
14
  a[1] = foo (*a);
15
  a[2] = foo (a);
16
  a[3] = foo (2, 3, 4, 5);
17
  a[4] = foo (a, a + 1, a + 2);
18
}
19
 
20
int
21
main ()
22
{
23
  int a[5];
24
  bar (a);
25
  if (a[0] != 1 || a[1] != 1 || a[2] != 2 || a[3] != 1 || a[4] != 2)
26
    abort ();
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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