public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/90085] c++17 template argument deduction results in missed optimization
[not found] <bug-90085-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-04 8:57 ` pinskia at gcc dot gnu.org
2024-04-05 23:31 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-04 8:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90085
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2019-04-16 00:00:00 |2021-8-4
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The problem in the deduction case, the decl is not being marked as
TREE_READONLY.
As you can see if you have a function which returns &Colors::names.
And look at the generated section for Colors::names:
.section
.rodata.Colors::names,"aG",@progbits,Colors::names,comdat
vs
.section
.data.Colors::names,"awG",@progbits,Colors::names,comdat
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/90085] c++17 template argument deduction results in missed optimization
[not found] <bug-90085-4@http.gcc.gnu.org/bugzilla/>
2021-08-04 8:57 ` [Bug c++/90085] c++17 template argument deduction results in missed optimization pinskia at gcc dot gnu.org
@ 2024-04-05 23:31 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-05 23:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90085
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |13.1.0
Known to fail| |12.3.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks to be fixed in GCC 13.
easiest way to see the difference is:
.section
.data._ZN6Colors5namesE,"awG",@progbits,_ZN6Colors5namesE,comdat
vs
.section
.rodata._ZN6Colors5namesE,"aG",@progbits,_ZN6Colors5namesE,comdat
at -O0.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-05 23:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-90085-4@http.gcc.gnu.org/bugzilla/>
2021-08-04 8:57 ` [Bug c++/90085] c++17 template argument deduction results in missed optimization pinskia at gcc dot gnu.org
2024-04-05 23:31 ` 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).