public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51523] New: LTO keeps unneeded functions (mingw32 target)
@ 2011-12-13  3:46 d.g.gorbachev at gmail dot com
  2011-12-13 11:07 ` [Bug target/51523] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-12-13  3:46 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51523
           Summary: LTO keeps unneeded functions (mingw32 target)
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com


Created attachment 26067
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26067
Testcase

Unless compiling with `-fvisibility=hidden'. I think it's a bug and not
intended behavior. Otherwise, it should be documented.

See also `--export-all-symbols' bug: <http://sourceware.org/PR13494>.


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

* [Bug target/51523] LTO keeps unneeded functions (mingw32 target)
  2011-12-13  3:46 [Bug target/51523] New: LTO keeps unneeded functions (mingw32 target) d.g.gorbachev at gmail dot com
@ 2011-12-13 11:07 ` rguenth at gcc dot gnu.org
  2011-12-13 11:15 ` ktietz at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-13 11:07 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |mingw32
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011-12-13
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-13 11:05:31 UTC ---
I think you need -fwhole-program as mingw32 is not using a linker plugin(?)
If so, this works as intended and the bug is invalid.


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

* [Bug target/51523] LTO keeps unneeded functions (mingw32 target)
  2011-12-13  3:46 [Bug target/51523] New: LTO keeps unneeded functions (mingw32 target) d.g.gorbachev at gmail dot com
  2011-12-13 11:07 ` [Bug target/51523] " rguenth at gcc dot gnu.org
@ 2011-12-13 11:15 ` ktietz at gcc dot gnu.org
  2011-12-13 11:41 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-12-13 11:15 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |ktietz at gcc dot gnu.org

--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-12-13 11:14:38 UTC ---
mingw use linker-plugin and therefore bug is valid


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

* [Bug target/51523] LTO keeps unneeded functions (mingw32 target)
  2011-12-13  3:46 [Bug target/51523] New: LTO keeps unneeded functions (mingw32 target) d.g.gorbachev at gmail dot com
  2011-12-13 11:07 ` [Bug target/51523] " rguenth at gcc dot gnu.org
  2011-12-13 11:15 ` ktietz at gcc dot gnu.org
@ 2011-12-13 11:41 ` rguenth at gcc dot gnu.org
  2011-12-14  6:22 ` d.g.gorbachev at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-13 11:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-13 11:30:28 UTC ---
Can you please attach the resolution file then?  It's the file passed
to -fresolution=<filename> at WPA stage which should be preserved and
seen with -v -save-temps.

What linker version are you using?


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

* [Bug target/51523] LTO keeps unneeded functions (mingw32 target)
  2011-12-13  3:46 [Bug target/51523] New: LTO keeps unneeded functions (mingw32 target) d.g.gorbachev at gmail dot com
                   ` (2 preceding siblings ...)
  2011-12-13 11:41 ` rguenth at gcc dot gnu.org
@ 2011-12-14  6:22 ` d.g.gorbachev at gmail dot com
  2011-12-14 10:37 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-12-14  6:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-12-14 06:02:21 UTC ---
Created attachment 26075
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26075
Two resolution files

Here you are.

The resolution files differ depending on whether -fvisibility=hidden is used.
When I added a wrapper script around lto1, which changed
PREVAILING_DEF_IRONLY_EXP to PREVAILING_DEF_IRONLY, "baz" disappeared.

I use LD 2.22.51 (trunk).


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

* [Bug target/51523] LTO keeps unneeded functions (mingw32 target)
  2011-12-13  3:46 [Bug target/51523] New: LTO keeps unneeded functions (mingw32 target) d.g.gorbachev at gmail dot com
                   ` (3 preceding siblings ...)
  2011-12-14  6:22 ` d.g.gorbachev at gmail dot com
@ 2011-12-14 10:37 ` rguenth at gcc dot gnu.org
  2011-12-14 15:53 ` d.g.gorbachev at gmail dot com
  2013-12-05 21:18 ` ktietz at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-14 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-14 10:36:15 UTC ---
This looks more like a linker bug which doesn't seem to account for the
contents of the .exp file.  It works properly on linux targets with providing a
version script, -Wl,--version-script=t.map with t.map containing

FOO_1.0 {
global:
  foo;
  bar;
local:
  *;
};


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

* [Bug target/51523] LTO keeps unneeded functions (mingw32 target)
  2011-12-13  3:46 [Bug target/51523] New: LTO keeps unneeded functions (mingw32 target) d.g.gorbachev at gmail dot com
                   ` (4 preceding siblings ...)
  2011-12-14 10:37 ` rguenth at gcc dot gnu.org
@ 2011-12-14 15:53 ` d.g.gorbachev at gmail dot com
  2013-12-05 21:18 ` ktietz at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-12-14 15:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-12-14 15:45:29 UTC ---
Filed a linker bug <http://sourceware.org/PR13497>.


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

* [Bug target/51523] LTO keeps unneeded functions (mingw32 target)
  2011-12-13  3:46 [Bug target/51523] New: LTO keeps unneeded functions (mingw32 target) d.g.gorbachev at gmail dot com
                   ` (5 preceding siblings ...)
  2011-12-14 15:53 ` d.g.gorbachev at gmail dot com
@ 2013-12-05 21:18 ` ktietz at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ktietz at gcc dot gnu.org @ 2013-12-05 21:18 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #7 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Ok, due it is a linker-bug, I close this bug as invalid.
If it is shown later that issue is however caused by gcc, please re-open.


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

end of thread, other threads:[~2013-12-05 21:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-13  3:46 [Bug target/51523] New: LTO keeps unneeded functions (mingw32 target) d.g.gorbachev at gmail dot com
2011-12-13 11:07 ` [Bug target/51523] " rguenth at gcc dot gnu.org
2011-12-13 11:15 ` ktietz at gcc dot gnu.org
2011-12-13 11:41 ` rguenth at gcc dot gnu.org
2011-12-14  6:22 ` d.g.gorbachev at gmail dot com
2011-12-14 10:37 ` rguenth at gcc dot gnu.org
2011-12-14 15:53 ` d.g.gorbachev at gmail dot com
2013-12-05 21:18 ` ktietz at gcc dot gnu.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).