public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/5125: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method
@ 2001-12-29  7:32 nathan
  0 siblings, 0 replies; 5+ messages in thread
From: nathan @ 2001-12-29  7:32 UTC (permalink / raw)
  To: dlenev, gcc-bugs, gcc-prs, nathan, nobody

Synopsis: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method

Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Sat Dec 29 07:32:22 2001
Responsible-Changed-Why:
    patch in progress

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5125


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

* Re: c++/5125: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method
@ 2001-12-29  9:15 nathan
  0 siblings, 0 replies; 5+ messages in thread
From: nathan @ 2001-12-29  9:15 UTC (permalink / raw)
  To: dlenev, gcc-bugs, gcc-prs, nathan

Synopsis: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Sat Dec 29 09:15:01 2001
State-Changed-Why:
    2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
    
    	PR c++/5125
    	* pt.c (push_template_decl_real): Make sure DECL has
    	DECL_LANG_SPECIFIC.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5125


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

* Re: c++/5125: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method
@ 2001-12-15  7:56 Dmitri Lenev
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitri Lenev @ 2001-12-15  7:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]

The following reply was made to PR c++/5125; it has been noted by GNATS.

From: Dmitri Lenev <dlenev@spylog.ru>
To: rodrigc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/5125: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method
Date: Sat, 15 Dec 2001 18:53:23 +0300

 Thanks a lot. 
 
 So it is ice-on-illegal-code sort of bug. :-)
 
 Anyway i have resolved the problem by slightly changing my design approach...
 
 * rodrigc@gcc.gnu.org <rodrigc@gcc.gnu.org> [01/12/15 18:23]:
 > Synopsis: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method
 > 
 > State-Changed-From-To: open->analyzed
 > State-Changed-By: rodrigc
 > State-Changed-When: Sat Dec 15 07:21:04 2001
 > State-Changed-Why:
 >     The compiler should probably not ICE, but your
 >     code example is illegal.  You made a spelling mistake in
 >     one of the parameter names:
 >     
 >     --- t.cc.orig   Sat Dec 15 10:19:55 2001
 >     +++ t.cc        Sat Dec 15 10:20:01 2001
 >     @@ -49,7 +49,7 @@
 >        SerializationStream::serializeMember (unsigned int member, const I & item,
 >                                             size_t (I::
 >                                                     *serialization_function)
 >     -                                       (SerializationSream & stream) const)
 >     +                                       (SerializationStream & stream) const)
 >      {
 >        serialize (member);
 >        size_t valueSize = item.*serialization_function (*this);
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5125
 
 -- 
 ó Õ×ÁÖÅÎÉÅÍ, äÍÉÔÒÉÊ ìÅÎÅ×.


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

* Re: c++/5125: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method
@ 2001-12-15  7:21 rodrigc
  0 siblings, 0 replies; 5+ messages in thread
From: rodrigc @ 2001-12-15  7:21 UTC (permalink / raw)
  To: dlenev, gcc-bugs, gcc-prs, nobody

Synopsis: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method

State-Changed-From-To: open->analyzed
State-Changed-By: rodrigc
State-Changed-When: Sat Dec 15 07:21:04 2001
State-Changed-Why:
    The compiler should probably not ICE, but your
    code example is illegal.  You made a spelling mistake in
    one of the parameter names:
    
    --- t.cc.orig   Sat Dec 15 10:19:55 2001
    +++ t.cc        Sat Dec 15 10:20:01 2001
    @@ -49,7 +49,7 @@
       SerializationStream::serializeMember (unsigned int member, const I & item,
                                            size_t (I::
                                                    *serialization_function)
    -                                       (SerializationSream & stream) const)
    +                                       (SerializationStream & stream) const)
     {
       serialize (member);
       size_t valueSize = item.*serialization_function (*this);

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5125


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

* c++/5125: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method
@ 2001-12-15  7:06 dlenev
  0 siblings, 0 replies; 5+ messages in thread
From: dlenev @ 2001-12-15  7:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5125
>Category:       c++
>Synopsis:       both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 15 07:06:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dmitri Lenev
>Release:        3.0.1 (SuSE)
>Organization:
>Environment:
System: Linux dlenev 2.4.10-4GB #1 Tue Sep 25 12:33:54 GMT 2001 i686 unknown
Architecture: i686

	
host: i486-suse-linux-gnu
build: i486-suse-linux-gnu
target: i486-suse-linux-gnu
configured with: ../configure --enable-threads=posix --enable-long-long --prefix=/opt/experimental --with-local-prefix=/usr/local --enable-languages=c,c++,f77,objc,java --disable-nls --enable-shared i486-suse-linux
>Description:
	both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile next code:

>How-To-Repeat:

// Code starts
typedef unsigned int size_t;

class SerializationStream
{
public:
  template <class I> size_t serialize(const I& item);
  template <class I> size_t serializeMember(unsigned int member, const I& item);

  template <class I> size_t serializeMember(unsigned int member, const I& item,
      size_t (I::* serialization_function)(SerializationStream& stream) const );

private:
};

template <class I>
inline
size_t
SerializationStream::serialize(const I& item)
{
  return item.serialize(*this);
}

template<>
inline
size_t
SerializationStream::serialize<unsigned int>(const unsigned int & item)
{
  return sizeof(int);
}

template <class I>
inline
size_t
SerializationStream::serializeMember(unsigned int member, const I& item)
{
    serialize(member);
    size_t valueSize = serialize(item);
    serialize(valueSize);
    return sizeof(int) + sizeof(int) + valueSize;
}

template <class I>
inline
size_t
SerializationStream::serializeMember(unsigned int member, const I& item ,
          size_t (I::* serialization_function)(SerializationSream& stream) const )
{
    serialize(member);
    size_t valueSize = item.*serialization_function(*this);
    serialize(valueSize);
    return sizeof(int) + sizeof(int) + valueSize;
}

int
main(int argc, char **argv)
{
}

// end code
Preprocessor code almost matches source

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


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

end of thread, other threads:[~2001-12-29 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-29  7:32 c++/5125: both g++ 3.0.1 and 2.95.3 crash with internal error when trying compile template method with parameter pointer to method nathan
  -- strict thread matches above, loose matches on Subject: below --
2001-12-29  9:15 nathan
2001-12-15  7:56 Dmitri Lenev
2001-12-15  7:21 rodrigc
2001-12-15  7:06 dlenev

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