This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/9512: Segmentation fault if qualifying name of template explicit specialisation in namespace


>Number:         9512
>Category:       c++
>Synopsis:       Segmentation fault if qualifying name of template explicit specialisation in namespace
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 30 18:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Volker Lukas
>Release:        3.4 20030129 (experimental)
>Organization:
>Environment:
System: Linux thunderbird 2.4.20 #1 Sat Jan 11 12:08:38 CET 2003 i686 unknown
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --prefix=/usr/local/gcc_newparser --enable-threads --disable-libgcj --enable-languages=c,c++ --disable-nls
>Description:
If in a namespace an explicit specialisation of a class template is defined, and the name of the primary template is qualified with the namespace name, the compiler stops with a segmentation fault.

This affects at least a gcc 3.4 snapshot from 2003-01-29
A gcc 3.2.2 snapshot of 2002-11-29 compiles the same code.

>How-To-Repeat:
compiling the attached code with gcc 3.4 20030129
>Fix:
exchanging the qualified name of the specialisation, i.e:

--------------------------------------------------------------
namespace Glib
{

template<typename T>
class Value
{

}; 


template <>
class Value<int>
{

}; 
---------------------------------------------------------------

The above compiles.



>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="test.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.ii"

IyAxICJ0ZXN0LmNwcCIKIyAxICI8YnVpbHQtaW4+IgojIDEgIjxjb21tYW5kIGxpbmU+IgojIDEg
InRlc3QuY3BwIgoKCm5hbWVzcGFjZSBHbGliCnsKCnRlbXBsYXRlPHR5cGVuYW1lIFQ+CmNsYXNz
IFZhbHVlCnsKCn07CgoKdGVtcGxhdGUgPD4KY2xhc3MgR2xpYjo6VmFsdWU8aW50Pgp7Cgp9OwoK
CgoKfQo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]