public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7115: Internal compiler error on template stuff
@ 2002-06-26  3:46 Reichelt
  0 siblings, 0 replies; 6+ messages in thread
From: Reichelt @ 2002-06-26  3:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, strieder@informatik.uni-kl.de, gcc-bugs@gcc.gnu.org,
        nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/7115: Internal compiler error on template stuff
Date: Wed, 26 Jun 2002 13:11:50 +0200

 Hi,
 
 the bug (at least one bug - maybe there are others?) can be exposed with
 the following code snippet:
 
 ----------------------------------snip here----------------------------
 template <unsigned int> class A {};
 
 template <typename T> A<sizeof(T*)> foo();
 
 void bar()
 {
    foo<void>();
 }
 ----------------------------------snip here----------------------------
 
 Compiling this with "g++ -c" I get
 
 bug.cpp: In function `void bar()':
 bug.cpp:7: internal error: Segmentation fault
 Please submit a full bug report, [etc.]
 
 This happens with gcc 3.0.x, 3.1, 3.1.1 as of 20020624 and the main
 trunk (tested on i686-pc-linux-gnu and mips-sgi-irix6.5).
 
 It's a regression from 2.95.x and is probably related to PR 7112
 (which is already marked "high priority").
 
 Greetings,
 Volker Reichelt
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7115
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7112
 
 


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

* Re: c++/7115: Internal compiler error on template stuff
@ 2002-07-02  8:50 lerdsuwa
  0 siblings, 0 replies; 6+ messages in thread
From: lerdsuwa @ 2002-07-02  8:50 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, strieder

Synopsis: Internal compiler error on template stuff

State-Changed-From-To: analyzed->closed
State-Changed-By: lerdsuwa
State-Changed-When: Tue Jul  2 08:50:06 2002
State-Changed-Why:
    Fixed.

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


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

* Re: c++/7115: Internal compiler error on template stuff
@ 2002-07-02  4:26 Reichelt
  0 siblings, 0 replies; 6+ messages in thread
From: Reichelt @ 2002-07-02  4:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, strieder@informatik.uni-kl.de, gcc-bugs@gcc.gnu.org,
        nobody@gcc.gnu.org, mark@codesourcery.com
Cc:  
Subject: Re: c++/7115: Internal compiler error on template stuff
Date: Tue, 2 Jul 2002 13:59:16 +0200

 Hi,
 
 the bugfix for PR 7112
 
   http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00060.html
 
 also fixes PR 7115 (original and reduced test example) as expected.
 Checked on i686-pc-linux-gnu (gcc version 3.1.1 20020701).
 
 Hence, PR 7115 can probably be closed.
 
 Greetings,
 Volker Reichelt
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7115
 
 


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

* Re: c++/7115: Internal compiler error on template stuff
@ 2002-06-26 16:36 Bernd Strieder
  0 siblings, 0 replies; 6+ messages in thread
From: Bernd Strieder @ 2002-06-26 16:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Bernd Strieder <strieder@rhrk.uni-kl.de>
To: Reichelt <reichelt@igpm.rwth-aachen.de>, gcc-gnats@gcc.gnu.org,
   strieder@informatik.uni-kl.de, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/7115: Internal compiler error on template stuff
Date: Wed, 26 Jun 2002 22:18:38 +0200

 > ----------------------------------snip here----------------------------
 > template <unsigned int> class A {};
 >
 > template <typename T> A<sizeof(T*)> foo();
 >
 > void bar()
 > {
 >    foo<void>();
 > }
 > ----------------------------------snip here----------------------------
 
 as I said in the bug report I'm busy preparing my thesis. The code causing ICE 
 in my report is not from me, stripping it down to the essentials has to wait. 
 I know it'd be very nice to have that done. But better than nothing, at least 
 the problem is known to exist.
 
 The code above seems to be quite different from the code the ICE is happening 
 in my example. The only thing in common is the template return type. The 
 project I'm working in has tons of advanced template code, some of the former 
 coders were very interested in STL, Boost, etc., and the techniques coming 
 from there. We were at the outer limits of g++ for several years having to 
 use alternate STL variants most of the time.
 
 Looking at the simplicity of the ICE example above, I really wonder, why I 
 haven't run earlier into the problem. There are obviously people working on 
 the problems at high priority, that makes me feel better.
 
 Bernd Strieder
 


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

* Re: c++/7115: Internal compiler error on template stuff
@ 2002-06-25  7:02 lerdsuwa
  0 siblings, 0 replies; 6+ messages in thread
From: lerdsuwa @ 2002-06-25  7:02 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, strieder

Synopsis: Internal compiler error on template stuff

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Tue Jun 25 06:58:46 2002
State-Changed-Why:
    Confirmed.

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


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

* c++/7115: Internal compiler error on template stuff
@ 2002-06-25  6:56 strieder
  0 siblings, 0 replies; 6+ messages in thread
From: strieder @ 2002-06-25  6:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7115
>Category:       c++
>Synopsis:       Internal compiler error on template stuff
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 25 02:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     strieder@informatik.uni-kl.de
>Release:        g++-3.0.4, g++-3.1, all snapshots since g++-3.1, but not g++-2.x
>Organization:
>Environment:
i686-pc-linux-gnu, in fact SuSE8.0 with some tools updated
>Description:
Internal compiler error when instantiating a template template member function, with various nested template types as return types or parameters.

template< class Node, class EdgeLabel >
template< class NodePredicate >
std::auto_ptr< std::vector< EdgeLabel > >
GraphBase< Node, EdgeLabel >::
findNodeBFS(
    const Node &  fromNode,
    NodePredicate predicate
    )
const
{
   return findNode< FindNodeConfig< FindBFSTag, Node, EdgeLabel, NodePredicate > >
     ( *this, fromNode, predicate );
}

findNode is a template function:

template< class Config >
  std::auto_ptr< std::vector< typename Config::EdgeLabel > >
  findNode(
      const GraphBase< typename Config::Node, typename Config::EdgeLabel > & graph
,
      const typename Config::Node &   fromNode,
      typename Config::NodePredicate  predicate
      )
  {
    ...
  }
g++ -v -save-temps  -O2 -pipe -W  -I. -I/net/home/bernd/xssr/sys     -c -o SRSMPAC
onjugate.o /net/home/bernd/xssr/sys/SRSMPAConjugate.cc
g++: warning: -pipe ignored because -save-temps specified
Reading specs from /net/bernd/gcc-new/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.1.1/s
pecs
Configured with: ../gcc-20020624/configure --prefix=/net/bernd/gcc-new/
Thread model: single
gcc version 3.1.1 20020624 (prerelease)
 /net/bernd/gcc-new/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.1.1/cpp0 -lang-c++ -D__
GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -I. -I/net/home/
bernd/xssr/sys -iprefix /net/bernd/gcc-new/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.
1.1/ -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=1 -D__ELF__ -Dunix -D__
gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__
linux -Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -
Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ /ne
t/home/bernd/xssr/sys/SRSMPAConjugate.cc -W SRSMPAConjugate.ii
GNU CPP version 3.1.1 20020624 (prerelease) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/net/bernd/gcc-new/i686-pc-linux-gnu/include"
ignoring nonexistent directory "/net/bernd/gcc-new/i686-pc-linux-gnu/include"
ignoring duplicate directory "/net/bernd/gcc-new/include/g++-v3"
ignoring duplicate directory "/net/bernd/gcc-new/include/g++-v3/i686-pc-linux-gnu"
ignoring duplicate directory "/net/bernd/gcc-new/include/g++-v3/backward"
ignoring duplicate directory "/net/bernd/gcc-new/lib/gcc-lib/i686-pc-linux-gnu/3.1
.1/include"
#include "..." search starts here:
#include <...> search starts here:
 .
 /net/home/bernd/xssr/sys
 /net/bernd/gcc-new/include/g++-v3
 /net/bernd/gcc-new/include/g++-v3/i686-pc-linux-gnu
 /net/bernd/gcc-new/include/g++-v3/backward
 /net/bernd/gcc-new/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/include
 /usr/local/include
 /net/bernd/gcc-new/include
 /usr/include
End of search list.
 /net/bernd/gcc-new/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.1.1/cc1plus -fpreproces
sed SRSMPAConjugate.ii -quiet -dumpbase SRSMPAConjugate.cc -O2 -W -version -o SRSM
PAConjugate.s
GNU CPP version 3.1.1 20020624 (prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1.1 20020624 (prerelease) (i686-pc-linux-gnu)
        compiled by GNU C version 2.95.3 20010315 (SuSE).
/net/home/bernd/xssr/sys/GraphBase.cc: In function
   `std::auto_ptr<std::vector<Config::EdgeLabel,
   std::allocator<Config::EdgeLabel> > > <unnamed>::findNode(const
   GraphBase<Config::Node, Config::EdgeLabel>&, Config::Node&,
   Config::NodePredicate) [with Config =
   <unnamed>::FindNodeConfig<<unnamed>::FindBFSTag, std::pair<int, int>,
   Xs_Letter,
   <unnamed>::FinalStateQuery<Xs_SRSMonoidPresAlgo::leftConjugate_MCM(Xs_SRSMonoid
PresAlgo::AlgorithmParameters*)::IntersectNFAType>
   >]':
/net/home/bernd/xssr/sys/GraphBase.cc:1328:   instantiated from `std::auto_ptr<std
::vector<EdgeLabel, std::allocator<_T2> > > GraphBase<N, E>::findNodeBFS(const Nod
e&, NodePredicate) const [with NodePredicate = <unnamed>::FinalStateQuery<Xs_SRSMo
noidPresAlgo::leftConjugate_MCM(Xs_SRSMonoidPresAlgo::AlgorithmParameters*)::Inter
sectNFAType>, Node = std::pair<int, int>, EdgeLabel = Xs_Letter]'
/net/home/bernd/xssr/sys/SRSMPAConjugate.cc:422:   instantiated from here
/net/home/bernd/xssr/sys/GraphBase.cc:1223: internal error:
   Speicherzugriffsfehler
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.



You can get an archive 220k tar.gz with the output, the .ii and the .s under

http://www-user.rhrk.uni-kl.de/~strieder/SRSMPAConjugate.tar.gz

I'm busy preparing my thesis for a few weeks to come, there is no time to strip the code down now. And I'm sure you don't like 220k binaries in your database.
>How-To-Repeat:
Extract the SRSMPAConjugate.ii file from the tar.gz.
g++ SRSMPAConjugate.ii
>Fix:
Use gcc-2.95.3 with an alternate STL.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-07-02 15:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-26  3:46 c++/7115: Internal compiler error on template stuff Reichelt
  -- strict thread matches above, loose matches on Subject: below --
2002-07-02  8:50 lerdsuwa
2002-07-02  4:26 Reichelt
2002-06-26 16:36 Bernd Strieder
2002-06-25  7:02 lerdsuwa
2002-06-25  6:56 strieder

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