------- Comment #4 from pinskia at gcc dot gnu dot org 2005-10-15 20:32 ------- (In reply to comment #3) > Note that I cannot reproduce with 4.0.0 and 4.0.1. I'm wondering whether is > even > more fallout from that static patch :( ... CC-ing Mark
It looks like it. file1.c: template<int dummy> struct X { static const int n_primes = 256; static const unsigned long primes[n_primes + 1]; }; template<int dummy> const int X<dummy>::n_primes; template<int dummy> const unsigned long X<dummy>::primes[n_primes + 1] = { 0 }; const unsigned long *f(void){return &X<0>::primes[0];} ------------------------------ file2.c: template<int dummy> struct X { static const int n_primes = 256; static const unsigned long primes[n_primes + 1]; }; template<int dummy> const int X<dummy>::n_primes; template<int dummy> const unsigned long X<dummy>::primes[n_primes + 1] = { 0 }; const unsigned long *f1(void){return &X<0>::primes[0];} int main(){} ------- Compile and link, this fails. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2005-10-15 20:32:13 date| | Summary|tr1::unordered_map duplicate|[4.0/4.1 Regression] |symbols (not extern?) |tr1::unordered_map duplicate | |symbols (not extern?) Target Milestone|--- |4.0.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24389