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
http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00110.html
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
init
/
init-ref4.C
blob
7cd6986ce529ccc310c1be60eef45441eb5ffd7e
1
// Origin: dgregor@gcc.gnu.org
2
// PR c++/11384
3
// foo<int>::_S_something was not being emitted (as a weak definition).
4
5
// { dg-do run }
6
// { dg-require-weak "" }
7
8
template<typename T>
9
struct foo
10
{
11
static const T _S_something;
12
};
13
14
template<typename T>
15
const T foo<T>::_S_something = T();
16
17
int main()
18
{
19
const int* p = &foo<int>::_S_something;
20
return 0;
21
}