This is the mail archive of the gcc-bugs@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++/5946: A -frepo failure



>Number:         5946
>Category:       c++
>Synopsis:       A -frepo failure
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 13 12:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.1 20020306 (prerelease)
>Organization:
>Environment:
System: IRIX64 d0mino 6.5 01091939 IP27


	
host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: ../gcc/configure --prefix=/home/snyder/infr/gcc-3.1irix/inst --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77
>Description:

When i try to build the program below on an irix host with -frepo,
collect exits with one template not instantiated.  Rerunning collect
completes the link properly.

Example:

--- start with a clean slate
$ rm x3.rpo

--- compile the source
$ g++ -c -frepo -mips4 -mabi=n32 x3.cc

--- try to link it.  collect halts with one template not instantiated.
$ g++ -mips4 -o x3 x3.o
collect: recompiling x3.cc
collect: relinking
collect: recompiling x3.cc
collect: relinking
ld32: ERROR   33 : Unresolved text symbol "d0_STL_Iterator<int>::d0_STL_Iterator[in-charge]()" -- 1st referenced by x3.o.
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO    152: Output file removed because of error.
collect2: ld returned 2 exit status

--- but if i then rerun collect, it completes successfully.
$ g++ -mips4 -o x3 x3.o
collect: recompiling x3.cc
collect: relinking
$ 


Here's a copy of the rpo file after the first link attempt.

M x3.cc
D /RunII/home/snyder/infr/test2/xx
A '-c' '-frepo' '-mips4' '-mabi=n32'
O _ZN15d0_STL_IteratorIiEC1Ev
O _ZN15d0_STL_IteratorIiEC2Ev
C _ZN9d0_List_1IiED0Ev
C _ZN9d0_List_1IiED1Ev
C _ZN9d0_List_1IiED2Ev
C _ZN7d0_ListIiE8d0_beginEv
C _ZTV7d0_ListIiE
C _ZTV9d0_List_1IiE


>How-To-Repeat:

---------------------------------------------------------------
template <class T>
struct d0_STL_Iterator
{
  d0_STL_Iterator ();
};
template <class T> d0_STL_Iterator<T>::d0_STL_Iterator () {}


template <class T>
struct d0_List_1
{
  virtual ~d0_List_1() {}
  void foo () { new d0_STL_Iterator<int>; }
};


template <class T>
struct d0_List
  : public d0_List_1<int>
{
  virtual void d0_begin ();
};
template <class T> void d0_List<T>::d0_begin ()
{ new d0_STL_Iterator<int>; }



d0_List<int> k;
template class d0_List_1<int>;
int main () {}
---------------------------------------------------------------

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