public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jamiespence2 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/58922] New: LTO undefined symbols with virtual destructor
Date: Wed, 30 Oct 2013 09:58:00 -0000	[thread overview]
Message-ID: <bug-58922-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 58922
           Summary: LTO undefined symbols with virtual destructor
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamiespence2 at gmail dot com

Created attachment 31111
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31111&action=edit
Small project to demonstrate virtual destructor with LTO

There seems to be an issue when compiling/Linking with LTO enabled with GCC
4.8.1. I get undefined references to symbols in a DLL even though they seem to
be present. With LTO disabled it compiles and links successfully. 

Dependency walker shows the symbols are present in the DLL. LTO can't seem to
find them.
Removing LTO optimization makes everything compile successfully, I'm wondering
why this is an issue.

Attached a small project which demonstrates the problem. 

GCC information: MinGW-Builds 4.8.1
>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw32/bin/../libexec/gcc/i686-w64-mingw32/4.8.1/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../../../src/gcc-4.8.1/configure --host=i686-w64-mingw32
--build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32
--with-sysroot=/tmp/x32-481-win32-dwarf-r5/mingw32 --enable-shared
--enable-static --disable-multilib
--enable-languages=ada,c,c++,fortran,objc,obj-c++,lto
--enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp
--enable-lto --enable-graphite --enable-checking=release
--enable-fully-dynamic-string --enable-version-specific-runtime-libs
--disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check
--disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug
--enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls
--disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686
--with-tune=generic --with-libiconv --with-system-zlib
--with-gmp=/tmp/mingw-prereq/i686-w64-mingw32-static
--with-mpfr=/tmp/mingw-prereq/i686-w64-mingw32-static
--with-mpc=/tmp/mingw-prereq/i686-w64-mingw32-static
--with-isl=/tmp/mingw-prereq/i686-w64-mingw32-static
--with-cloog=/tmp/mingw-prereq/i686-w64-mingw32-static
--enable-cloog-backend=isl --with-pkgversion='rev5, Built by MinGW-W64 project'
--with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe
-I/tmp/x32-481-win32-dwarf-r5/libs/include -I/tmp/mingw-prereq/x32-zlib/include
-I/tmp/mingw-prereq/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe
-I/tmp/x32-481-win32-dwarf-r5/libs/include -I/tmp/mingw-prereq/x32-zlib/include
-I/tmp/mingw-prereq/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe
-L/tmp/x32-481-win32-dwarf-r5/libs/lib -L/tmp/mingw-prereq/x32-zlib/lib
-L/tmp/mingw-prereq/i686-w64-mingw32-static/lib
-L/tmp/x32-481-win32-dwarf-r5/mingw32/opt/lib -Wl,--large-address-aware'
Thread model: win32
gcc version 4.8.1 (rev5, Built by MinGW-W64 project)


                 reply	other threads:[~2013-10-30  9:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-58922-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).