public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3613: no instantiation of explicitly initialized static template member variaibles on alphas
@ 2001-07-09  2:56 sts
  0 siblings, 0 replies; only message in thread
From: sts @ 2001-07-09  2:56 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3613
>Category:       c++
>Synopsis:       no instantiation of explicitly initialized static template member variaibles on alphas
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 09 02:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     sts@ica1.uni-stuttgart.de
>Release:        gcc-3.0
>Organization:
>Environment:
alpha OSF 5.0
>Description:
The following piece of code does not link on alpha/OSF5.0.
If the '=0' in the static initialization is removed, the code compiles 
fine. On non-alpha platforms, I have not observed this problem. 

11:22 tiger_sts:~/bugs/gnu> uname -a
OSF1 tiger.ica1.uni-stuttgart.de V5.0 910 alpha
11:22 tiger_sts:~/bugs/gnu> g++ static.cc 
/bin/ld:
Unresolved:
A<0>::our       
collect2: ld returned 1 exit status

11:22 tiger_sts:~/bugs/gnu> g++ -v 
Reading specs from /local/gcc-3.0/lib/gcc-lib/alphaev56-dec-osf4.0f/3.0/specs
Configured with: /share/src/gcc-3.0/configure --prefix=/local/gcc-3.0 --host=alp
haev56-dec-osf4.0f --target=alphaev56-dec-osf4.0f
Thread model: single
gcc version 3.0

11:22 tiger_sts:~/bugs/gnu> cat static.cc


template<int N>
struct A {
  static int our; 
};

template<int N>
int A<N>::our = 0;

int main(){
  return A<0>::our; 
}
>How-To-Repeat:
// on alpha, try to compile
template<int N>
struct A {
  static int our; 
};

template<int N>
int A<N>::our = 0;

int main(){
  return A<0>::our; 
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-07-09  2:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-09  2:56 c++/3613: no instantiation of explicitly initialized static template member variaibles on alphas sts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).