repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
sizeof.C
blob
159c55400040cfe4e824becec9312b153a64a7df
1
// { dg-do run }
2
extern "C" void abort();
3
4
template <int I>
5
int bar() { return I; }
6
7
template <class T>
8
int foo(T)
9
{
10
return bar<sizeof(T) + 4>() + bar<sizeof(long) + 7>();
11
}
12
13
14
int main()
15
{
16
if (foo(2) != sizeof(int) + 4 + sizeof(long) + 7)
17
abort();
18
}