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++/7115: Internal compiler error on template stuff


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


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