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/] [auto10.C] - Blame information for rev 315

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

Line No. Rev Author Line
1 301 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.