[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-06-02 Thread nathan at gcc dot gnu dot org

--- Additional Comments From nathan at gcc dot gnu dot org  2005-06-02 
09:08 ---
2005-06-02  Nathan Sidwell  [EMAIL PROTECTED]

PR c++/20350
* decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-06-02 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-06-02 
09:10 ---
Subject: Bug 20350

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-06-02 09:09:48

Modified files:
gcc/cp : ChangeLog decl.c 
gcc/testsuite  : ChangeLog 
Added files:
gcc/testsuite/g++.dg/template: spec24.C 

Log message:
cp:
PR c++/20350
* decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
testsuite:
PR c++/20350
* g++.dg/template/spec24.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gccr1=1.4768r2=1.4769
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gccr1=1.1399r2=1.1400
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gccr1=1.5576r2=1.5577
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/spec24.C.diff?cvsroot=gccr1=1.1r2=1.2



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-06-01 Thread nathan at gcc dot gnu dot org

--- Additional Comments From nathan at gcc dot gnu dot org  2005-06-01 
10:07 ---
Even smaller test case

template int i struct Mutex
{
  static int mutex;
};

template int i
int Mutexi::mutex = {1};

template  int Mutex0::mutex;
template  int Mutex0::mutex = 0;

void g()
{
  Mutex0::mutex = 0;
}



-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2005-03-06 23:49:41 |2005-06-01 10:07:38
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-06-01 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-06-01 
14:47 ---
Subject: Bug 20350

CVSROOT:/cvs/gcc
Module name:gcc
Branch: gcc-4_0-branch
Changes by: [EMAIL PROTECTED]   2005-06-01 14:47:07

Modified files:
gcc/cp : ChangeLog decl.c 
gcc/testsuite  : ChangeLog 
Added files:
gcc/testsuite/g++.dg/template: spec24.C 

Log message:
cp:
PR c++/20350
* decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
testsuite:
PR c++/20350
* g++.dg/template/spec24.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.4648.2.51r2=1.4648.2.52
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.1371.2.11r2=1.1371.2.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.5084.2.217r2=1.5084.2.218
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/spec24.C.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=NONEr2=1.1.2.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-05-30 Thread carlo at gcc dot gnu dot org

--- Additional Comments From carlo at gcc dot gnu dot org  2005-05-31 02:33 
---
If you remove the 'extern', the compiler still crashes:

struct a { int i, j; };
template int i struct mutex_tct { static a S_mutex; };
template int i a mutex_tcti::S_mutex = {0,1};
template  a mutex_tct0::S_mutex;
template  a mutex_tct0::S_mutex = {0,1};
void g() { mutex_tct0::S_mutex.i = 0; }

g++-4.0.0 -v troep.cc
Using built-in specs.
Target: i686-redhat-linux
Configured with: /usr/src/gcc/gcc-4.0.0/configure --prefix=/usr/local/gcc-4.0.0
--enable-shared --with-gnu-as --with-gnu-ld--enable-languages=c++ --enable-debug
--enable-threads=posix --disable-checking --with-system-zlib
--enable-__cxa_atexit --host=i686-redhat-linux
Thread model: posix
gcc version 4.0.0
 /usr/local/gcc-4.0.0/libexec/gcc/i686-redhat-linux/4.0.0/cc1plus -quiet -v
-D_GNU_SOURCE troep.cc -quiet -dumpbase troep.cc -mtune=pentiumpro -auxbase
troep -version -o /tmp/ccDplkLP.s
ignoring nonexistent directory
/usr/local/gcc-4.0.0/lib/gcc/i686-redhat-linux/4.0.0/../../../../i686-redhat-linux/include
#include ... search starts here:
#include ... search starts here:
 
/usr/local/gcc-4.0.0/lib/gcc/i686-redhat-linux/4.0.0/../../../../include/c++/4.0.0
 
/usr/local/gcc-4.0.0/lib/gcc/i686-redhat-linux/4.0.0/../../../../include/c++/4.0.0/i686-redhat-linux
 
/usr/local/gcc-4.0.0/lib/gcc/i686-redhat-linux/4.0.0/../../../../include/c++/4.0.0/backward
 /usr/local/include
 /usr/local/gcc-4.0.0/include
 /usr/local/gcc-4.0.0/lib/gcc/i686-redhat-linux/4.0.0/include
 /usr/include
End of search list.
GNU C++ version 4.0.0 (i686-redhat-linux)
compiled by GNU C version 4.0.0.
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113235
troep.cc:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-04-20 Thread mmitchel at gcc dot gnu dot org


-- 
   What|Removed |Added

   Target Milestone|4.0.0   |4.0.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-03-09 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

   Severity|critical|normal


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-03-08 Thread mmitchel at gcc dot gnu dot org

--- Additional Comments From mmitchel at gcc dot gnu dot org  2005-03-09 
06:42 ---
This is not valid code.  The extern specifier in the template specialization
is not permitted by ISO C++, nor is the G++ extern template extension.

-- 
   What|Removed |Added

   Keywords|ice-on-valid-code   |ice-on-invalid-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-03-06 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-06 
23:49 ---
Confirmed, reduced testcase:
struct a { int i, j; };
template int i struct mutex_tct { static a S_mutex; };
template int i a mutex_tcti::S_mutex = {0,1};
template  extern a mutex_tct0::S_mutex;
template  a mutex_tct0::S_mutex = {0,1};
void g() { mutex_tct0::S_mutex.i = 0; }


-- 
   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Severity|normal  |critical
 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Keywords||ice-on-valid-code
   Last reconfirmed|-00-00 00:00:00 |2005-03-06 23:49:41
   date||
Summary|4.0 and higher: ICE |[4.0/4.1 Regression] extern
   ||template and struct
   ||initializer and
   ||specification for a static
   ||variable
   Target Milestone|--- |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-03-06 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-06 
23:51 ---
It worked with 4.0.0 20041124 so it is semi new.

-- 
   What|Removed |Added

  Known to fail||4.0.0 4.1.0
  Known to work||3.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350


[Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable

2005-03-06 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-06 
23:58 ---
This even works with 4.0.0 20050113  but fails with 4.0.0 20050201 more 
prove that this is very 
recent regression.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20350