[Bug c++/50226] New: Wrong code with -O -fno-implicit-templates

d.g.gorbachev at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 29 16:09:00 GMT 2011


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

             Bug #: 50226
           Summary: Wrong code with -O -fno-implicit-templates
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com
            Target: i686-pc-linux-gnu


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

Compile with `g++-4.7.0 -O -fno-implicit-templates 1.cc 2.cc'.

GOLD gives warnings:

function main: warning: relocation refers to discarded section
function vtable for Beth<int>: warning: relocation refers to discarded section

BFD LD remains silent.

Appeared between rev. 174012 and 176963.



More information about the Gcc-bugs mailing list