public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99456] New: [11 regression] ABI breakage with some static initialization
@ 2021-03-07 20:50 nathan at gcc dot gnu.org
  2021-03-07 20:51 ` [Bug c++/99456] " nathan at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-03-07 20:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99456
           Summary: [11 regression] ABI breakage with some static
                    initialization
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

Created attachment 50326
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50326&action=edit
testcase

I've noticed some poorer behaviour in trunk than gcc10 with emitting inline
vars.  The example when compiled with gcc-10 -std=c++17 emits only those vars
that are reachable from the externally visible vars.  I.e. Var1...Var4 are NOT
present.  Further all vars are statically initialized with no global
initializer function.
(This is regardless of optimization level).

With trunk, all the inline vars are emitted, even when not referenced. 
Further, there is a gloabl initializer function emitted, that only tests and
sets their respective guard variables, with two exceptions.

Var3 and Var13 are dynamically initialized. This is an abi breakage.

I attach the two assembly files generated (the source presumes LP32 or LP64
ABI)

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-03-22  2:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-07 20:50 [Bug c++/99456] New: [11 regression] ABI breakage with some static initialization nathan at gcc dot gnu.org
2021-03-07 20:51 ` [Bug c++/99456] " nathan at gcc dot gnu.org
2021-03-07 20:51 ` nathan at gcc dot gnu.org
2021-03-07 21:01 ` pinskia at gcc dot gnu.org
2021-03-08  9:56 ` rguenth at gcc dot gnu.org
2021-03-08 11:34 ` jakub at gcc dot gnu.org
2021-03-08 12:47 ` nathan at gcc dot gnu.org
2021-03-08 13:21 ` jakub at gcc dot gnu.org
2021-03-08 13:30 ` jakub at gcc dot gnu.org
2021-03-08 13:32 ` nathan at gcc dot gnu.org
2021-03-08 13:39 ` jakub at gcc dot gnu.org
2021-03-08 14:03 ` jakub at gcc dot gnu.org
2021-03-08 14:21 ` jakub at gcc dot gnu.org
2021-03-08 15:48 ` nathan at gcc dot gnu.org
2021-03-09 10:12 ` jakub at gcc dot gnu.org
2021-03-09 11:05 ` jakub at gcc dot gnu.org
2021-03-19 17:38 ` cvs-commit at gcc dot gnu.org
2021-03-19 17:38 ` jakub at gcc dot gnu.org
2021-03-22  2:09 ` unlvsur at live dot com

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).