public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
@ 2010-09-24 21:09 ` sje at cup dot hp.com
  2010-09-24 22:40 ` sje at cup dot hp.com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: sje at cup dot hp.com @ 2010-09-24 21:09 UTC (permalink / raw)
  To: gcc-bugs

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

Steve Ellcey <sje at cup dot hp.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.09.24 21:06:43
               date|                            |
                 CC|                            |sje at cup dot hp.com
     Ever Confirmed|0                           |1

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
  2010-09-24 21:09 ` [Bug middle-end/45388] [4.6 Regression] Global constructor not found sje at cup dot hp.com
@ 2010-09-24 22:40 ` sje at cup dot hp.com
  2010-09-25  0:15 ` sje at cup dot hp.com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: sje at cup dot hp.com @ 2010-09-24 22:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Steve Ellcey <sje at cup dot hp.com> 2010-09-24 22:21:38 UTC ---
I have verified that the bug shows up in r163443.  Looking at the assembly
language differences between 163442 and 163443, both versions have
_GLOBAL__I_65535_0__ZN2c12f6Ev,
a global routine to call the static initializer
(_Z41__static_initialization_and_destruction_0ii), but the new version also has
_GLOBAL__I__ZN2c12f6Ev to call the static initializer and this routine is not
global.  If I change the assembly language code to change the
GLOBAL__I__ZN2c12f6Ev function from static (.PARAM) to global (.EXPORT) then
the code will compile.

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
  2010-09-24 21:09 ` [Bug middle-end/45388] [4.6 Regression] Global constructor not found sje at cup dot hp.com
  2010-09-24 22:40 ` sje at cup dot hp.com
@ 2010-09-25  0:15 ` sje at cup dot hp.com
  2010-09-27 10:39 ` dave at hiauly1 dot hia.nrc.ca
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: sje at cup dot hp.com @ 2010-09-25  0:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Steve Ellcey <sje at cup dot hp.com> 2010-09-24 23:45:28 UTC ---
I have a patch I am testing.  It worked on the test case but I haven't fully
bootstrapped it.

Index: ipa.c
===================================================================
--- ipa.c       (revision 164578)
+++ ipa.c       (working copy)
@@ -1480,6 +1480,7 @@ build_cdtor (bool ctor_p, VEC (tree, hea
            DECL_STATIC_CONSTRUCTOR (fn) = 0;
          else
            DECL_STATIC_DESTRUCTOR (fn) = 0;
+         TREE_PUBLIC (fn) = 1;
          /* We do not want to optimize away pure/const calls here.
             When optimizing, these should be already removed, when not
             optimizing, we want user to be able to breakpoint in them.  */

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-09-25  0:15 ` sje at cup dot hp.com
@ 2010-09-27 10:39 ` dave at hiauly1 dot hia.nrc.ca
  2010-12-12 19:55 ` hubicka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: dave at hiauly1 dot hia.nrc.ca @ 2010-09-27 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from dave at hiauly1 dot hia.nrc.ca 2010-09-26 23:21:44 UTC ---
Hi Steve,

> I have a patch I am testing.  It worked on the test case but I haven't fully
> bootstrapped it.

Keep plugging away on this.

I have the sense that the breakage is intentional.  I fought the same
battle in 4.5, so Honza should be aware what's happened.  I believe that
he doesn't want the constructors to be global to improve interprocedurial
optimisations.  I'm sure this could be fixed with a target hook, but
Honza doesn't really work on anything but x86.

Regards,
Dave


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2010-09-27 10:39 ` dave at hiauly1 dot hia.nrc.ca
@ 2010-12-12 19:55 ` hubicka at gcc dot gnu.org
  2010-12-13 17:29 ` hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: hubicka at gcc dot gnu.org @ 2010-12-12 19:55 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-12-12 19:54:28 UTC ---
Mine, patch sent http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00961.html

Sorry about the delay. 

The problem is not that I would not want constructors to be global. The problem
was that since the original constructor merging was introduced (in 2004), C++
FE produced collect2 recognizable names for no reason. This problem was masked
by fact that the code set always inline flag on all functions. This is wrong,
since not all functions are inlinable so it can lead to ICE when non-inlinable
static constructor is introduced.

The patch should avoid those recognizable names until final merging pass and
thus avoid the problem.

Honza


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2010-12-12 19:55 ` hubicka at gcc dot gnu.org
@ 2010-12-13 17:29 ` hubicka at gcc dot gnu.org
  2010-12-13 17:32 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: hubicka at gcc dot gnu.org @ 2010-12-13 17:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-12-13 17:29:17 UTC ---
Author: hubicka
Date: Mon Dec 13 17:29:14 2010
New Revision: 167753

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167753
Log:

    PR middle-end/45388
    * decl2.c (start_objects): Do not generate collect2 recognicable name
    for static ctor.
    * ipa.c (cgraph_build_static_cdtor_1): Break out from ... ; add FINAL
parameter.
    (cgraph_build_static_cdtor): ... here.
    (build_cdtor): Use cgraph_build_static_cdtor_1.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cp/ChangeLog


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2010-12-13 17:29 ` hubicka at gcc dot gnu.org
@ 2010-12-13 17:32 ` hubicka at gcc dot gnu.org
  2010-12-13 18:05 ` amonakov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: hubicka at gcc dot gnu.org @ 2010-12-13 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #10 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-12-13 17:31:47 UTC ---
Fixed by my patch.


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2010-12-13 17:32 ` hubicka at gcc dot gnu.org
@ 2010-12-13 18:05 ` amonakov at gcc dot gnu.org
  2010-12-14  1:27 ` hubicka at gcc dot gnu.org
  2010-12-15 11:55 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 15+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-12-13 18:05 UTC (permalink / raw)
  To: gcc-bugs

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

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #11 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-13 18:05:21 UTC ---
Only Changelog changed have been checked in.


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2010-12-13 18:05 ` amonakov at gcc dot gnu.org
@ 2010-12-14  1:27 ` hubicka at gcc dot gnu.org
  2010-12-15 11:55 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 15+ messages in thread
From: hubicka at gcc dot gnu.org @ 2010-12-14  1:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> 2010-12-14 01:26:51 UTC ---
Author: hubicka
Date: Tue Dec 14 01:26:47 2010
New Revision: 167781

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167781
Log:
This time really commit
    PR middle-end/45388
    * decl2.c (start_objects): Do not generate collect2 recognicable name
    for static ctor.
    * ipa.c (cgraph_build_static_cdtor_1): Break out from ... ; add FINAL
parameter.
    (cgraph_build_static_cdtor): ... here.
    (build_cdtor): Use cgraph_build_static_cdtor_1.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cp/decl2.c
    trunk/gcc/ipa.c


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
       [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2010-12-14  1:27 ` hubicka at gcc dot gnu.org
@ 2010-12-15 11:55 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 15+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-15 11:55 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-15 11:55:07 UTC ---
Assuming this is fixed now.


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
  2010-08-23 20:51 [Bug middle-end/45388] New: " danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-08-24 15:07 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2010-09-02 11:19 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-02 11:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
  2010-08-23 20:51 [Bug middle-end/45388] New: " danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-08-24 12:13 ` hubicka at gcc dot gnu dot org
@ 2010-08-24 15:07 ` dave at hiauly1 dot hia dot nrc dot ca
  2010-09-02 11:19 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 15+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2010-08-24 15:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dave at hiauly1 dot hia dot nrc dot ca  2010-08-24 15:06 -------
Subject: Re:  [4.6 Regression] Global constructor not found

> Is there another consturctor calling this one? (or can you attach complette .s
> file?) Perhaps it is result of my constructor merging patch.

Unfortunately, the .s is gone for the moment.  What I showed contained
all the references to the constructor.  There is no `.EXPORT' statement,
so the constructor is local.

I believe it was caused by your constructor merging patch, but I haven't
explicitly verified this.

Collect2 builds a table of constructors to call at startup.  This startup
file is then linked into the final executable.  This only works if the
constructors are global symbols.

Dave


-- 


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


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
  2010-08-23 20:51 [Bug middle-end/45388] New: " danglin at gcc dot gnu dot org
  2010-08-23 20:58 ` [Bug middle-end/45388] " danglin at gcc dot gnu dot org
  2010-08-24  8:55 ` rguenth at gcc dot gnu dot org
@ 2010-08-24 12:13 ` hubicka at gcc dot gnu dot org
  2010-08-24 15:07 ` dave at hiauly1 dot hia dot nrc dot ca
  2010-09-02 11:19 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 15+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2010-08-24 12:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hubicka at gcc dot gnu dot org  2010-08-24 12:12 -------
Is there another consturctor calling this one? (or can you attach complette .s
file?) Perhaps it is result of my constructor merging patch.


-- 


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


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
  2010-08-23 20:51 [Bug middle-end/45388] New: " danglin at gcc dot gnu dot org
  2010-08-23 20:58 ` [Bug middle-end/45388] " danglin at gcc dot gnu dot org
@ 2010-08-24  8:55 ` rguenth at gcc dot gnu dot org
  2010-08-24 12:13 ` hubicka at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-08-24  8:55 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.6.0


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


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

* [Bug middle-end/45388] [4.6 Regression] Global constructor not found
  2010-08-23 20:51 [Bug middle-end/45388] New: " danglin at gcc dot gnu dot org
@ 2010-08-23 20:58 ` danglin at gcc dot gnu dot org
  2010-08-24  8:55 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu dot org @ 2010-08-23 20:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from danglin at gcc dot gnu dot org  2010-08-23 20:58 -------
Constructor is no longer global:

        .PARAM _GLOBAL__I__ZN2c12f6Ev,PRIV_LEV=3
L$FB0035:
_GLOBAL__I__ZN2c12f6Ev:

As a result, collect2 does not find the constructor.


-- 


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


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

end of thread, other threads:[~2010-12-15 11:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-45388-4@http.gcc.gnu.org/bugzilla/>
2010-09-24 21:09 ` [Bug middle-end/45388] [4.6 Regression] Global constructor not found sje at cup dot hp.com
2010-09-24 22:40 ` sje at cup dot hp.com
2010-09-25  0:15 ` sje at cup dot hp.com
2010-09-27 10:39 ` dave at hiauly1 dot hia.nrc.ca
2010-12-12 19:55 ` hubicka at gcc dot gnu.org
2010-12-13 17:29 ` hubicka at gcc dot gnu.org
2010-12-13 17:32 ` hubicka at gcc dot gnu.org
2010-12-13 18:05 ` amonakov at gcc dot gnu.org
2010-12-14  1:27 ` hubicka at gcc dot gnu.org
2010-12-15 11:55 ` jakub at gcc dot gnu.org
2010-08-23 20:51 [Bug middle-end/45388] New: " danglin at gcc dot gnu dot org
2010-08-23 20:58 ` [Bug middle-end/45388] " danglin at gcc dot gnu dot org
2010-08-24  8:55 ` rguenth at gcc dot gnu dot org
2010-08-24 12:13 ` hubicka at gcc dot gnu dot org
2010-08-24 15:07 ` dave at hiauly1 dot hia dot nrc dot ca
2010-09-02 11:19 ` rguenth 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).