https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629

            Bug ID: 100629
           Summary: Regression from 10 symbol mismatch between class
                    definition and use with optimization
           Product: gcc
           Version: 11.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mckelvey at maskull dot com
  Target Milestone: ---

Created attachment 50820
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50820&action=edit
Source of Break class

On gcc-11/12 I get undefined symbols on link. Like this:

/usr/bin/ld: header_edit.o:header_edit.cc:(.text.startup+0x36a): undefined
reference to
`_ZN13PatternDriver12BreakPatternC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_26ConflateIntegerScalarValueESB_RKNS_12TemplateEnumIL_ZNS_16complement_namesB5cxx11EEL_ZNS_14COMPLEMENTENUMEEEE'

>From main program header_edit.o:

_ZN13PatternDriver12BreakPatternC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_26ConflateIntegerScalarValueESB_RKNS_12TemplateEnumIL_ZNS_16complement_namesB5cxx11EEL_ZNS_14COMPLEMENTENUMEEEE

from BreakPattern.o:

_ZN13PatternDriver12BreakPatternC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_26ConflateIntegerScalarValueESB_RKNS_12TemplateEnumIL_ZNS_16complement_namesEEL_ZNS_14COMPLEMENTENUMEEEE

The problem is that the second string has the sequence B5cxx11. That sequence
goes away when I change the optimization level from level 3 to default. I don't
know how to reduce to a simple test case.

Reply via email to