public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/8991] [solaris] g++ 3.2.1 with -frepo on templates - puts collect2 into an infinite loop
       [not found] <20021218094601.8991.neil.ferguson@aepona.com>
@ 2003-07-17 16:45 ` msp at nortelnetworks dot com
  2003-07-17 17:05 ` msp at nortelnetworks dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: msp at nortelnetworks dot com @ 2003-07-17 16:45 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8991



------- Additional Comments From msp at nortelnetworks dot com  2003-07-17 16:45 -------
I have also just encountered the same problem using gcc 3.3 under Solaris 5.8.

The problem appears to be that for certain symbol types (see later), the
compiler ALLWAYS emits a CHOOSEN line in the .rpo file. In particular it appears
to be a data symbol from a template specialisation?! Not sure if function
specialisations are also bad.

Meanwhile collect2 (actually tlink.c:freadsym) tries to ensure exactly one .rpo
file lists the symbol as choosen. Everytime it changes a .rpo file, it
recompiles the .cc, which sets the symbol back to choosen..... Result an
infinite loop.

The problem may appear intermitent, because if a link is aborted the .rpo files
may have be in a changed to good state, and therefore tlink will simply quite
after the successful initial link. It is 100% repruducable with care.

So it appears that the bug is that the compiler is emitting .rpo information for
a symbol that it ALWAYS produces, when it shouldn't.

The particular form of symbol which is problematic appears to be some form of
specialistation. I have attached an example input file, but the critical line is
as follows:-

template unsigned char __Atomicity_lock<0>::_S_atomicity_lock; 

This produces the following .rpo entry:-
C _ZN16__Atomicity_lockILi0EE17_S_atomicity_lockE

and the following symbol:-
00000000 V _ZN16__Atomicity_lockILi0EE17_S_atomicity_lockE

In all files which include the code.


REPRODUCTION NOTES
==================

The problem will ONLY occur if the first link fails and collect2/tlink decides
to change a .rpo and recompile.

rm z.rpo z2.rpo
g++ -frepo z.cc -o z.o  -c -DMAIN
g++ -frepo z.cc -o z2.o  -c
g++ -frepo z.o z2.o

Any idea how to fix this?


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

* [Bug c++/8991] [solaris] g++ 3.2.1 with -frepo on templates - puts collect2 into an infinite loop
       [not found] <20021218094601.8991.neil.ferguson@aepona.com>
  2003-07-17 16:45 ` [Bug c++/8991] [solaris] g++ 3.2.1 with -frepo on templates - puts collect2 into an infinite loop msp at nortelnetworks dot com
@ 2003-07-17 17:05 ` msp at nortelnetworks dot com
  2003-07-17 17:10 ` [Bug c++/8991] g++ " pinskia at physics dot uc dot edu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: msp at nortelnetworks dot com @ 2003-07-17 17:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8991



------- Additional Comments From msp at nortelnetworks dot com  2003-07-17 17:05 -------
Two small updates:-

1) There should have been a static before the "user" function in the attachment.
     With it, the code will link and run when not using -frepo, but loop when
using it.

2) This also REPRODUCES under LINUX, using a intel Mandrake 9 system, but with a
fresh build of gcc 3.3!


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

* [Bug c++/8991] g++ with -frepo on templates - puts collect2 into an infinite loop
       [not found] <20021218094601.8991.neil.ferguson@aepona.com>
  2003-07-17 16:45 ` [Bug c++/8991] [solaris] g++ 3.2.1 with -frepo on templates - puts collect2 into an infinite loop msp at nortelnetworks dot com
  2003-07-17 17:05 ` msp at nortelnetworks dot com
@ 2003-07-17 17:10 ` pinskia at physics dot uc dot edu
  2004-06-15 21:34 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-17 17:10 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8991


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[solaris] g++ 3.2.1 with -  |g++ with -frepo on templates
                   |frepo on templates - puts   |- puts collect2 into an
                   |collect2 into an infinite   |infinite loop
                   |loop                        |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-17 17:10 -------
I can reproduce it on the mainline (20030717) on i686-unknown-openbsd3.1 with the minimal 
example so this bug is target independent and still happens.


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

* [Bug c++/8991] g++ with -frepo on templates - puts collect2 into an infinite loop
       [not found] <20021218094601.8991.neil.ferguson@aepona.com>
                   ` (2 preceding siblings ...)
  2003-07-17 17:10 ` [Bug c++/8991] g++ " pinskia at physics dot uc dot edu
@ 2004-06-15 21:34 ` pinskia at gcc dot gnu dot org
  2004-08-24  5:39 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-15 21:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-15 21:34 -------
*** Bug 15407 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uttamkumar at hotmail dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8991


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

* [Bug c++/8991] g++ with -frepo on templates - puts collect2 into an infinite loop
       [not found] <20021218094601.8991.neil.ferguson@aepona.com>
                   ` (3 preceding siblings ...)
  2004-06-15 21:34 ` pinskia at gcc dot gnu dot org
@ 2004-08-24  5:39 ` pinskia at gcc dot gnu dot org
  2004-08-24  6:43 ` mmitchel at gcc dot gnu dot org
  2004-09-14  1:15 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-24  5:39 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |17163


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8991


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

* [Bug c++/8991] g++ with -frepo on templates - puts collect2 into an infinite loop
       [not found] <20021218094601.8991.neil.ferguson@aepona.com>
                   ` (4 preceding siblings ...)
  2004-08-24  5:39 ` pinskia at gcc dot gnu dot org
@ 2004-08-24  6:43 ` mmitchel at gcc dot gnu dot org
  2004-09-14  1:15 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-24  6:43 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 8991 depends on bug 17163, which changed state.

Bug 17163 Summary: [3.5 Regression] ICE with -frepo and static class variables
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17163

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8991


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

* [Bug c++/8991] g++ with -frepo on templates - puts collect2 into an infinite loop
       [not found] <20021218094601.8991.neil.ferguson@aepona.com>
                   ` (5 preceding siblings ...)
  2004-08-24  6:43 ` mmitchel at gcc dot gnu dot org
@ 2004-09-14  1:15 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-14  1:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-14 01:15 -------
Fixed for 4.0.0 by Mark's patches for always unit-at-a-time.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8991


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

end of thread, other threads:[~2004-09-14  1:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20021218094601.8991.neil.ferguson@aepona.com>
2003-07-17 16:45 ` [Bug c++/8991] [solaris] g++ 3.2.1 with -frepo on templates - puts collect2 into an infinite loop msp at nortelnetworks dot com
2003-07-17 17:05 ` msp at nortelnetworks dot com
2003-07-17 17:10 ` [Bug c++/8991] g++ " pinskia at physics dot uc dot edu
2004-06-15 21:34 ` pinskia at gcc dot gnu dot org
2004-08-24  5:39 ` pinskia at gcc dot gnu dot org
2004-08-24  6:43 ` mmitchel at gcc dot gnu dot org
2004-09-14  1:15 ` pinskia at gcc dot gnu dot org

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