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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [auto10.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Positive test for auto
2
// { dg-do run }
3
// { dg-options "-std=c++0x" }
4
 
5
#include 
6
extern "C" void abort();
7
 
8
int main()
9
{
10
  if (auto i = 42L)
11
    {
12
      if (typeid (i) != typeid (long int))
13
        abort ();
14
    }
15
 
16
  while (auto i = 1)
17
    {
18
      if (typeid (i) != typeid (int))
19
        abort ();
20
      break;
21
    }
22
}

powered by: WebSVN 2.1.0

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