repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
auto10.C
blob
296873eeda8b801eefaa0634e592f6ca1dea7c18
1
// Positive test for auto
2
// { dg-do run { target c++11 } }
3
4
#include <typeinfo>
5
extern "C" void abort();
6
7
int main()
8
{
9
if (auto i = 42L)
10
{
11
if (typeid (i) != typeid (long int))
12
abort ();
13
}
14
15
while (auto i = 1)
16
{
17
if (typeid (i) != typeid (int))
18
abort ();
19
break;
20
}
21
}