This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/71660] [5/6/7/8 regression] alignment of std::atomic<8 byte primitive type> (long long, double) is wrong on x86
- From: "thiago at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 05 Sep 2017 17:06:32 +0000
- Subject: [Bug libstdc++/71660] [5/6/7/8 regression] alignment of std::atomic<8 byte primitive type> (long long, double) is wrong on x86
- Auto-submitted: auto-generated
- References: <bug-71660-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71660
--- Comment #10 from Thiago Macieira <thiago at kde dot org> ---
Actually, PR 65146 points out that the problem is not efficiency but
correctness. An under-aligned type could cross a cacheline boundary and thus
fail to be atomic in the first place.
Therefore, it is correct to increase the alignment, even if that causes an ABI
change for existing structures. Those structures were disasters waiting to
happen.
I withdraw my bug report. Close it as INVALID or NOTABUG or whatever is
appropriate.