public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20350] New: 4.0 and higher: ICE
@ 2005-03-06 22:31 carlo at gcc dot gnu dot org
  2005-03-06 22:33 ` [Bug c++/20350] " carlo at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: carlo at gcc dot gnu dot org @ 2005-03-06 22:31 UTC (permalink / raw)
  To: gcc-bugs

/usr/local/gcc-cvs-4.1/libexec/gcc/i686-redhat-linux/4.1.0/cc1plus
-fpreprocessed threading.ii -quiet -dumpbase threading.cc -mtune=pentiumpro
-auxbase-strip .libs/libcwd_r_la-threading.o -g -Wall -Woverloaded-virtual
-Wundef -Wpointer-arith -Wwrite-strings -Werror -version -fno-exceptions
-fno-exceptions -fPIC -o threading.s
GNU C++ version 4.1.0 20050306 (experimental) (i686-redhat-linux)
        compiled by GNU C version 4.1.0 20050306 (experimental).
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113285
../libcwd/threading.cc:704: 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.

threading.ii.bz2 is attached.

-- 
           Summary: 4.0 and higher: ICE
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: carlo at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-redhat-linux-gnu


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] 4.0 and higher: ICE
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
@ 2005-03-06 22:33 ` carlo at gcc dot gnu dot org
  2005-03-06 23:20 ` carlo at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: carlo at gcc dot gnu dot org @ 2005-03-06 22:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From carlo at gcc dot gnu dot org  2005-03-06 22:33 -------
Created an attachment (id=8345)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8345&action=view)
bzip2-ed preprocessed source code.


-- 


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] 4.0 and higher: ICE
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
  2005-03-06 22:33 ` [Bug c++/20350] " carlo at gcc dot gnu dot org
@ 2005-03-06 23:20 ` carlo at gcc dot gnu dot org
  2005-03-06 23:49 ` [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: carlo at gcc dot gnu dot org @ 2005-03-06 23:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From carlo at gcc dot gnu dot org  2005-03-06 23:20 -------
Created an attachment (id=8348)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8348&action=view)
Same, but without PCH.

Sorry, the previous one was compiled with pch.
This one is without PCH.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #8345 is|0                           |1
           obsolete|                            |


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
  2005-03-06 22:33 ` [Bug c++/20350] " carlo at gcc dot gnu dot org
  2005-03-06 23:20 ` carlo at gcc dot gnu dot org
@ 2005-03-06 23:49 ` pinskia at gcc dot gnu dot org
  2005-03-06 23:51 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-06 23:49 UTC (permalink / raw)
  To: gcc-bugs


------- 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_tct<i>::S_mutex = {0,1};
template <> extern a mutex_tct<0>::S_mutex;
template <> a mutex_tct<0>::S_mutex = {0,1};
void g() { mutex_tct<0>::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|0000-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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-03-06 23:49 ` [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable pinskia at gcc dot gnu dot org
@ 2005-03-06 23:51 ` pinskia at gcc dot gnu dot org
  2005-03-06 23:58 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-06 23:51 UTC (permalink / raw)
  To: gcc-bugs


------- 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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-03-06 23:51 ` pinskia at gcc dot gnu dot org
@ 2005-03-06 23:58 ` pinskia at gcc dot gnu dot org
  2005-03-09  6:42 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-06 23:58 UTC (permalink / raw)
  To: gcc-bugs


------- 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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-03-06 23:58 ` pinskia at gcc dot gnu dot org
@ 2005-03-09  6:42 ` mmitchel at gcc dot gnu dot org
  2005-03-09 20:16 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-03-09  6:42 UTC (permalink / raw)
  To: gcc-bugs


------- 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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-03-09  6:42 ` mmitchel at gcc dot gnu dot org
@ 2005-03-09 20:16 ` pinskia at gcc dot gnu dot org
  2005-04-21  5:05 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-09 20:16 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-03-09 20:16 ` pinskia at gcc dot gnu dot org
@ 2005-04-21  5:05 ` mmitchel at gcc dot gnu dot org
  2005-05-31  2:36 ` carlo at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-04-21  5:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.0                       |4.0.1


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-04-21  5:05 ` mmitchel at gcc dot gnu dot org
@ 2005-05-31  2:36 ` carlo at gcc dot gnu dot org
  2005-06-01 10:07 ` nathan at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: carlo at gcc dot gnu dot org @ 2005-05-31  2:36 UTC (permalink / raw)
  To: gcc-bugs


------- 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_tct<i>::S_mutex = {0,1};
template <> a mutex_tct<0>::S_mutex;
template <> a mutex_tct<0>::S_mutex = {0,1};
void g() { mutex_tct<0>::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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-05-31  2:36 ` carlo at gcc dot gnu dot org
@ 2005-06-01 10:07 ` nathan at gcc dot gnu dot org
  2005-06-01 14:47 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-06-01 10:07 UTC (permalink / raw)
  To: gcc-bugs


------- 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 Mutex<i>::mutex = {1};

template <> int Mutex<0>::mutex;
template <> int Mutex<0>::mutex = 0;

void g()
{
  Mutex<0>::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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2005-06-01 10:07 ` nathan at gcc dot gnu dot org
@ 2005-06-01 14:47 ` cvs-commit at gcc dot gnu dot org
  2005-06-02  9:08 ` nathan at gcc dot gnu dot org
  2005-06-02  9:10 ` cvs-commit at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-01 14:47 UTC (permalink / raw)
  To: gcc-bugs


------- 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:	nathan@gcc.gnu.org	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=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.51&r2=1.4648.2.52
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1371.2.11&r2=1.1371.2.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.217&r2=1.5084.2.218
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/spec24.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2005-06-01 14:47 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-02  9:08 ` nathan at gcc dot gnu dot org
  2005-06-02  9:10 ` cvs-commit at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-06-02  9:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2005-06-02 09:08 -------
2005-06-02  Nathan Sidwell  <nathan@codesourcery.com>

	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


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable
  2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2005-06-02  9:08 ` nathan at gcc dot gnu dot org
@ 2005-06-02  9:10 ` cvs-commit at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-02  9:10 UTC (permalink / raw)
  To: gcc-bugs


------- 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:	nathan@gcc.gnu.org	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=gcc&r1=1.4768&r2=1.4769
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1399&r2=1.1400
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5576&r2=1.5577
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/spec24.C.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-06-02  9:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-06 22:31 [Bug c++/20350] New: 4.0 and higher: ICE carlo at gcc dot gnu dot org
2005-03-06 22:33 ` [Bug c++/20350] " carlo at gcc dot gnu dot org
2005-03-06 23:20 ` carlo at gcc dot gnu dot org
2005-03-06 23:49 ` [Bug c++/20350] [4.0/4.1 Regression] extern template and struct initializer and specification for a static variable pinskia at gcc dot gnu dot org
2005-03-06 23:51 ` pinskia at gcc dot gnu dot org
2005-03-06 23:58 ` pinskia at gcc dot gnu dot org
2005-03-09  6:42 ` mmitchel at gcc dot gnu dot org
2005-03-09 20:16 ` pinskia at gcc dot gnu dot org
2005-04-21  5:05 ` mmitchel at gcc dot gnu dot org
2005-05-31  2:36 ` carlo at gcc dot gnu dot org
2005-06-01 10:07 ` nathan at gcc dot gnu dot org
2005-06-01 14:47 ` cvs-commit at gcc dot gnu dot org
2005-06-02  9:08 ` nathan at gcc dot gnu dot org
2005-06-02  9:10 ` cvs-commit at gcc dot gnu dot org

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).