public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization
@ 2021-05-17 0:06 mckelvey at maskull dot com
2021-05-17 5:54 ` [Bug c++/100629] " mckelvey at maskull dot com
` (27 more replies)
0 siblings, 28 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 0:06 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
@ 2021-05-17 5:54 ` mckelvey at maskull dot com
2021-05-17 5:59 ` mckelvey at maskull dot com
` (26 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 5:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #1 from James McKelvey <mckelvey at maskull dot com> ---
Created attachment 50821
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50821&action=edit
Source of Main
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
2021-05-17 5:54 ` [Bug c++/100629] " mckelvey at maskull dot com
@ 2021-05-17 5:59 ` mckelvey at maskull dot com
2021-05-17 7:00 ` pinskia at gcc dot gnu.org
` (25 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 5:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #2 from James McKelvey <mckelvey at maskull dot com> ---
Occurs with and without optimization. I'll compare errors between the two.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
2021-05-17 5:54 ` [Bug c++/100629] " mckelvey at maskull dot com
2021-05-17 5:59 ` mckelvey at maskull dot com
@ 2021-05-17 7:00 ` pinskia at gcc dot gnu.org
2021-05-17 7:00 ` pinskia at gcc dot gnu.org
` (24 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-17 7:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The difference is
PatternDriver::TemplateEnum<PatternDriver::complement_names[abi:cxx11]
vs
PatternDriver::TemplateEnum<PatternDriver::complement_names
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (2 preceding siblings ...)
2021-05-17 7:00 ` pinskia at gcc dot gnu.org
@ 2021-05-17 7:00 ` pinskia at gcc dot gnu.org
2021-05-17 7:01 ` pinskia at gcc dot gnu.org
` (23 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-17 7:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> The difference is
> PatternDriver::TemplateEnum<PatternDriver::complement_names[abi:cxx11]
> vs
> PatternDriver::TemplateEnum<PatternDriver::complement_names
Can you attach the preprocessed source for both?
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (3 preceding siblings ...)
2021-05-17 7:00 ` pinskia at gcc dot gnu.org
@ 2021-05-17 7:01 ` pinskia at gcc dot gnu.org
2021-05-17 7:08 ` pinskia at gcc dot gnu.org
` (22 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-17 7:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> The difference is
> PatternDriver::TemplateEnum<PatternDriver::complement_names[abi:cxx11]
> vs
> PatternDriver::TemplateEnum<PatternDriver::complement_names
Sorry I just mean:
PatternDriver::complement_names[abi:cxx11]
vs
PatternDriver::complement_names
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (4 preceding siblings ...)
2021-05-17 7:01 ` pinskia at gcc dot gnu.org
@ 2021-05-17 7:08 ` pinskia at gcc dot gnu.org
2021-05-17 9:36 ` redi at gcc dot gnu.org
` (21 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-17 7:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-05-17
Status|UNCONFIRMED |WAITING
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> (In reply to Andrew Pinski from comment #3)
> > The difference is
> > PatternDriver::TemplateEnum<PatternDriver::complement_names[abi:cxx11]
> > vs
> > PatternDriver::TemplateEnum<PatternDriver::complement_names
>
> Sorry I just mean:
> PatternDriver::complement_names[abi:cxx11]
> vs
> PatternDriver::complement_names
Are you sure there is no define for _GLIBCXX_USE_CXX11_ABI used somewhere?
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html also.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (5 preceding siblings ...)
2021-05-17 7:08 ` pinskia at gcc dot gnu.org
@ 2021-05-17 9:36 ` redi at gcc dot gnu.org
2021-05-17 9:40 ` redi at gcc dot gnu.org
` (20 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 9:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #6)
> Are you sure there is no define for _GLIBCXX_USE_CXX11_ABI used somewhere?
Both symbols are using std::__cxx11::basic_string so that means both files are
using the cxx11 ABI.
We need the preprocessed source. The files attached are useless because they
don't show the definition of PatternDriver::complement_names.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (6 preceding siblings ...)
2021-05-17 9:36 ` redi at gcc dot gnu.org
@ 2021-05-17 9:40 ` redi at gcc dot gnu.org
2021-05-17 16:32 ` mckelvey at maskull dot com
` (19 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I suspect that one file only sees a forward declaration of complement_names
(without the abi_tag) and the other file sees the definition (with the
abi_tag). The question is why the tag is on that type at all, but without
preprocessed sources we can only guess.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (7 preceding siblings ...)
2021-05-17 9:40 ` redi at gcc dot gnu.org
@ 2021-05-17 16:32 ` mckelvey at maskull dot com
2021-05-17 16:34 ` mckelvey at maskull dot com
` (18 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 16:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #9 from James McKelvey <mckelvey at maskull dot com> ---
Created attachment 50823
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50823&action=edit
Preprocessed source for BreakPattern.h
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (8 preceding siblings ...)
2021-05-17 16:32 ` mckelvey at maskull dot com
@ 2021-05-17 16:34 ` mckelvey at maskull dot com
2021-05-17 16:57 ` [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization mckelvey at maskull dot com
` (17 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 16:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #10 from James McKelvey <mckelvey at maskull dot com> ---
Created attachment 50824
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50824&action=edit
Preprocessed source for main
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (9 preceding siblings ...)
2021-05-17 16:34 ` mckelvey at maskull dot com
@ 2021-05-17 16:57 ` mckelvey at maskull dot com
2021-05-17 16:58 ` mckelvey at maskull dot com
` (16 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #11 from James McKelvey <mckelvey at maskull dot com> ---
I don't see _GLIBCXX_USE_CXX11_ABI anywhere in the code.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (10 preceding siblings ...)
2021-05-17 16:57 ` [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization mckelvey at maskull dot com
@ 2021-05-17 16:58 ` mckelvey at maskull dot com
2021-05-17 17:04 ` mckelvey at maskull dot com
` (15 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 16:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #12 from James McKelvey <mckelvey at maskull dot com> ---
I don't see _GLIBCXX_USE_CXX11_ABI anywhere in the code.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (11 preceding siblings ...)
2021-05-17 16:58 ` mckelvey at maskull dot com
@ 2021-05-17 17:04 ` mckelvey at maskull dot com
2021-05-17 18:15 ` redi at gcc dot gnu.org
` (14 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 17:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
James McKelvey <mckelvey at maskull dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mckelvey at maskull dot com
--- Comment #13 from James McKelvey <mckelvey at maskull dot com> ---
Created attachment 50825
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50825&action=edit
Preprocessed source for BreakPattern.cc
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (12 preceding siblings ...)
2021-05-17 17:04 ` mckelvey at maskull dot com
@ 2021-05-17 18:15 ` redi at gcc dot gnu.org
2021-05-17 18:26 ` mckelvey at maskull dot com
` (13 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 18:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to James McKelvey from comment #10)
> Created attachment 50824 [details]
> Preprocessed source for main
This is header_edit.cc right?
I don't see any definition of the missing constructor here. This one:
BreakPattern(const pdstring& value,
const ConflateIntegerScalarValue& minimum,
const ConflateIntegerScalarValue& maximum,
const ComplementEnum& a_complement);
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (13 preceding siblings ...)
2021-05-17 18:15 ` redi at gcc dot gnu.org
@ 2021-05-17 18:26 ` mckelvey at maskull dot com
2021-05-17 18:27 ` mckelvey at maskull dot com
` (12 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 18:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #15 from James McKelvey <mckelvey at maskull dot com> ---
The Break's are actually functions that call the constructor. They look like
this:
inline BreakPattern
Break(const AbstractStringScalarValue& value,
const ComplementEnum& a_complement = noncomplement)
{
return BreakPattern(value, a_complement);
}
there are 12 of them.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (14 preceding siblings ...)
2021-05-17 18:26 ` mckelvey at maskull dot com
@ 2021-05-17 18:27 ` mckelvey at maskull dot com
2021-05-17 18:44 ` mckelvey at maskull dot com
` (11 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 18:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #16 from James McKelvey <mckelvey at maskull dot com> ---
The Break's are actually functions that call the constructor. They look like
this:
inline BreakPattern
Break(const AbstractStringScalarValue& value,
const ComplementEnum& a_complement = noncomplement)
{
return BreakPattern(value, a_complement);
}
there are 12 of them.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (15 preceding siblings ...)
2021-05-17 18:27 ` mckelvey at maskull dot com
@ 2021-05-17 18:44 ` mckelvey at maskull dot com
2021-05-17 19:51 ` mckelvey at maskull dot com
` (10 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 18:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #17 from James McKelvey <mckelvey at maskull dot com> ---
Sorry, that constructor is in the .cc file. Looks like the .cc contents weren't
picked up by the attempt to get the preprocessed source.
BreakPattern::
BreakPattern(const pdstring& value,
const ConflateIntegerScalarValue& minimum,
const ConflateIntegerScalarValue& maximum,
const ComplementEnum& a_complement)
:
AbsCharSetPattern(value,
a_complement,
std::max(minimum._get_minimum_match_length(), 1UL) -
1UL),
_minimum(minimum._get_value()),
_maximum(maximum._get_value())
{
}
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (16 preceding siblings ...)
2021-05-17 18:44 ` mckelvey at maskull dot com
@ 2021-05-17 19:51 ` mckelvey at maskull dot com
2021-05-17 20:24 ` redi at gcc dot gnu.org
` (9 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 19:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #18 from James McKelvey <mckelvey at maskull dot com> ---
If I build with -D_GLIBCXX_USE_CXX11_ABI=0 it all works. But with =1 I get the
mismatches.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (17 preceding siblings ...)
2021-05-17 19:51 ` mckelvey at maskull dot com
@ 2021-05-17 20:24 ` redi at gcc dot gnu.org
2021-05-17 20:34 ` redi at gcc dot gnu.org
` (8 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 20:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |UNCONFIRMED
Ever confirmed|1 |0
--- Comment #19 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to James McKelvey from comment #17)
> Sorry, that constructor is in the .cc file.
Ah yes, sorry, I see it now.
I tried to reproduce the issue with this code, but the symbol is always mangled
consistently (with and without MAIN defined):
#include <vector>
#include <string>
class CString { };
extern const std::vector<std::string> complement_names;
extern const CString COMPLEMENTENUM;
template <const std::vector<std::string>& names,
const CString& title>
class TemplateEnum
{
};
class ConflateIntegerScalarValue { };
typedef TemplateEnum<complement_names, COMPLEMENTENUM> ComplementEnum;
struct BreakPattern
{
BreakPattern(const std::string&,
const ConflateIntegerScalarValue&,
const ConflateIntegerScalarValue&,
const ComplementEnum&);
};
#ifdef MAIN
int main()
{
BreakPattern b("", {}, {}, {});
}
#else
BreakPattern::
BreakPattern(const std::string&,
const ConflateIntegerScalarValue&,
const ConflateIntegerScalarValue&,
const ComplementEnum&)
{
}
#endif
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (18 preceding siblings ...)
2021-05-17 20:24 ` redi at gcc dot gnu.org
@ 2021-05-17 20:34 ` redi at gcc dot gnu.org
2021-05-17 20:37 ` redi at gcc dot gnu.org
` (7 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 20:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
--- Comment #20 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Please also provide all the gcc options you're using, as requested at
https://gcc.gnu.org/bugs/
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (19 preceding siblings ...)
2021-05-17 20:34 ` redi at gcc dot gnu.org
@ 2021-05-17 20:37 ` redi at gcc dot gnu.org
2021-05-17 20:53 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 20:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |link-failure
Known to fail| |11.1.1, 12.0
Status|WAITING |NEW
--- Comment #21 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to James McKelvey from comment #10)
> Created attachment 50824 [details]
> Preprocessed source for main
OK, I can confirm it using this file, at -O2 or -O3.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (20 preceding siblings ...)
2021-05-17 20:37 ` redi at gcc dot gnu.org
@ 2021-05-17 20:53 ` redi at gcc dot gnu.org
2021-05-17 21:05 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 20:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #22 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This doesn't seem to be a compiler change, because I see the same mangling
compiling the .ii with GCC 10 (after adjusting the .ii to remove the uses of
the new intrinsics from GCC 11). So possibly a library change.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (21 preceding siblings ...)
2021-05-17 20:53 ` redi at gcc dot gnu.org
@ 2021-05-17 21:05 ` redi at gcc dot gnu.org
2021-05-17 21:36 ` mckelvey at maskull dot com
` (4 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 21:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #23 from Jonathan Wakely <redi at gcc dot gnu.org> ---
OK, the bad mangling happens with -O1 -fdevirtualize and not with -O1 alone.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (22 preceding siblings ...)
2021-05-17 21:05 ` redi at gcc dot gnu.org
@ 2021-05-17 21:36 ` mckelvey at maskull dot com
2021-05-17 22:02 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: mckelvey at maskull dot com @ 2021-05-17 21:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #24 from James McKelvey <mckelvey at maskull dot com> ---
Running Cygwin 3.2.0(0.340/5/3) under Windows 10.
Using built-in specs.
COLLECT_GCC=/usr/local/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-cygwin/11.1.1/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: ./configure --enable-languages=c,c++
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 11.1.1 20210515 (GCC)
Compiler options compiling project:
/usr/local/bin/g++ -std=c++0x -c -O3 -DNDEBUG -DUSE_INTL=1 -DUSE_MUTEX=1
-D_FORTIFY_SOURCE=1 -pedantic-errors -Werror -fno-common -Wall -Wold-style-cast
-Wsign-promo -Wpointer-arith -Wundef -Wwrite-strings -Winvalid-pch
-Woverloaded-virtual -Wcast-qual -Wextra -Wredundant-decls -Wshadow
-Wcast-align=strict -Wcomment -fstrict-aliasing -Winit-self
-Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wlogical-op -Wconversion
-Wsign-conversion -Wmissing-declarations -Wdeprecated -ftree-switch-conversion
-Wuninitialized -Wparentheses -Wimplicit-fallthrough=5 -Wformat-nonliteral
-Wformat-truncation=2 -Wformat-signedness -Wdouble-promotion -Wformat=2
-Wformat-overflow=2 -Wformat-security -Wnull-dereference -Wmain
-Wmultistatement-macros -Wsequence-point -Wswitch-default -Wswitch-enum
-Wunused-value -Wstrict-overflow=2 -Warith-conversion -Wfloat-conversion
-Wduplicated-cond -Wunsafe-loop-optimizations -Wreturn-type -Wunused-parameter
-Wmaybe-uninitialized -Wstrict-aliasing -Wsuggest-attribute=noreturn
-Wsuggest-attribute=format -Wsuggest-attribute=malloc
-Wmissing-format-attribute -Wmissing-noreturn -Walloc-zero -Walloca
-Wtrampolines -Wcast-function-type -Wlogical-op -Wpacked -Wredundant-decls
-Wunused -Wmismatched-dealloc -Wmismatched-new-delete -Wfree-nonheap-object
-Wexceptions -MMD -fimplicit-templates
For linking:
/usr/local/bin/g++ -std=c++0x -O3 -DNDEBUG -DUSE_INTL=1 -DUSE_MUTEX=1
-D_FORTIFY_SOURCE=1 -pedantic-errors -Werror -fno-common -Wall -Wold-style-cast
-Wsign-promo -Wpointer-arith -Wundef -Wwrite-strings -Winvalid-pch
-Woverloaded-virtual -Wcast-qual -Wextra -Wredundant-decls -Wshadow
-Wcast-align=strict -Wcomment -fstrict-aliasing -Winit-self
-Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wlogical-op -Wconversion
-Wsign-conversion -Wmissing-declarations -Wdeprecated -ftree-switch-conversion
-Wuninitialized -Wparentheses -Wimplicit-fallthrough=5 -Wformat-nonliteral
-Wformat-truncation=2 -Wformat-signedness -Wdouble-promotion -Wformat=2
-Wformat-overflow=2 -Wformat-security -Wnull-dereference -Wmain
-Wmultistatement-macros -Wsequence-point -Wswitch-default -Wswitch-enum
-Wunused-value -Wstrict-overflow=2 -Warith-conversion -Wfloat-conversion
-Wduplicated-cond -Wunsafe-loop-optimizations -Wreturn-type -Wunused-parameter
-Wmaybe-uninitialized -Wstrict-aliasing -Wsuggest-attribute=noreturn
-Wsuggest-attribute=format -Wsuggest-attribute=malloc
-Wmissing-format-attribute -Wmissing-noreturn -Walloc-zero -Walloca
-Wtrampolines -Wcast-function-type -Wlogical-op -Wpacked -Wredundant-decls
-Wunused -Wmismatched-dealloc -Wmismatched-new-delete -Wfree-nonheap-object
-Wexceptions -Winline -MMD -fimplicit-templates -Wl,-warn-common -L.. -o
header_edit.exe header_edit.o -lPatternDriver -lintl -lpthread
Yes I know that most warnings have no effect at link time.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (23 preceding siblings ...)
2021-05-17 21:36 ` mckelvey at maskull dot com
@ 2021-05-17 22:02 ` redi at gcc dot gnu.org
2021-05-17 22:06 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 22:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #25 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 50830
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50830&action=edit
auto-reduced testcase
This produces different mangling depending on -fdevirtualize
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (24 preceding siblings ...)
2021-05-17 22:02 ` redi at gcc dot gnu.org
@ 2021-05-17 22:06 ` redi at gcc dot gnu.org
2021-05-17 22:29 ` redi at gcc dot gnu.org
2021-08-12 0:52 ` pinskia at gcc dot gnu.org
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 22:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #26 from Jonathan Wakely <redi at gcc dot gnu.org> ---
But I can't confirm this as a regression, because the same behaviour goes all
the way back to GCC 5.1 when the abi_tag was introduced.
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (25 preceding siblings ...)
2021-05-17 22:06 ` redi at gcc dot gnu.org
@ 2021-05-17 22:29 ` redi at gcc dot gnu.org
2021-08-12 0:52 ` pinskia at gcc dot gnu.org
27 siblings, 0 replies; 29+ messages in thread
From: redi at gcc dot gnu.org @ 2021-05-17 22:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #27 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Created attachment 50831
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50831&action=edit
further reduced
^ permalink raw reply [flat|nested] 29+ messages in thread
* [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
` (26 preceding siblings ...)
2021-05-17 22:29 ` redi at gcc dot gnu.org
@ 2021-08-12 0:52 ` pinskia at gcc dot gnu.org
27 siblings, 0 replies; 29+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12 0:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=69621
Keywords| |ABI, wrong-code
--- Comment #28 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Seems related to PR 69621.
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2021-08-12 0:52 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 0:06 [Bug c++/100629] New: Regression from 10 symbol mismatch between class definition and use with optimization mckelvey at maskull dot com
2021-05-17 5:54 ` [Bug c++/100629] " mckelvey at maskull dot com
2021-05-17 5:59 ` mckelvey at maskull dot com
2021-05-17 7:00 ` pinskia at gcc dot gnu.org
2021-05-17 7:00 ` pinskia at gcc dot gnu.org
2021-05-17 7:01 ` pinskia at gcc dot gnu.org
2021-05-17 7:08 ` pinskia at gcc dot gnu.org
2021-05-17 9:36 ` redi at gcc dot gnu.org
2021-05-17 9:40 ` redi at gcc dot gnu.org
2021-05-17 16:32 ` mckelvey at maskull dot com
2021-05-17 16:34 ` mckelvey at maskull dot com
2021-05-17 16:57 ` [Bug c++/100629] Regression from 10 symbol mismatch between class definition and use with/without optimization mckelvey at maskull dot com
2021-05-17 16:58 ` mckelvey at maskull dot com
2021-05-17 17:04 ` mckelvey at maskull dot com
2021-05-17 18:15 ` redi at gcc dot gnu.org
2021-05-17 18:26 ` mckelvey at maskull dot com
2021-05-17 18:27 ` mckelvey at maskull dot com
2021-05-17 18:44 ` mckelvey at maskull dot com
2021-05-17 19:51 ` mckelvey at maskull dot com
2021-05-17 20:24 ` redi at gcc dot gnu.org
2021-05-17 20:34 ` redi at gcc dot gnu.org
2021-05-17 20:37 ` redi at gcc dot gnu.org
2021-05-17 20:53 ` redi at gcc dot gnu.org
2021-05-17 21:05 ` redi at gcc dot gnu.org
2021-05-17 21:36 ` mckelvey at maskull dot com
2021-05-17 22:02 ` redi at gcc dot gnu.org
2021-05-17 22:06 ` redi at gcc dot gnu.org
2021-05-17 22:29 ` redi at gcc dot gnu.org
2021-08-12 0:52 ` pinskia 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).