public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "foom at fuhm dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65945] C++ alignment of nullptr_t is 1 and might cause unaligned stores to the frame Date: Fri, 22 May 2015 18:20:00 -0000 [thread overview] Message-ID: <bug-65945-4-CYrw21ngtU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65945-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65945 James Y Knight <foom at fuhm dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |foom at fuhm dot net --- Comment #9 from James Y Knight <foom at fuhm dot net> --- This also happens on Sparc. A test-case is really easy to make: int foo(bool&&, decltype(nullptr)&&, bool&&); void doit() { foo(false, nullptr, false); } save %sp, -104, %sp stb %g0, [%fp-6] /* WTF unaligned store */ st %g0, [%fp-5] stb %g0, [%fp-1] add %fp, -6, %g3 add %fp, -5, %g2 add %fp, -1, %g1 mov %g3, %o0 mov %g2, %o1 mov %g1, %o2 call _Z3fooObODnS_, 0 nop return %i7+8 nop .ident "GCC: (Debian 4.9.2-10) 4.9.2" This breaks building recent versions of clang on Sparc, because it calls emplace_back with nullptr, which results in an expression like the above.
next prev parent reply other threads:[~2015-05-22 18:20 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-30 10:08 [Bug c++/65945] New: ARM: unaligned access when stroing nullptr npl at chello dot at 2015-04-30 10:09 ` [Bug c++/65945] " npl at chello dot at 2015-04-30 10:13 ` npl at chello dot at 2015-04-30 11:29 ` [Bug c++/65945] C++ alignment of nullptr_t is 1 and might cause unaligned stores to the frame redi at gcc dot gnu.org 2015-04-30 13:47 ` npl at chello dot at 2015-04-30 13:57 ` npl at chello dot at 2015-04-30 14:30 ` pinskia at gcc dot gnu.org 2015-04-30 20:27 ` npl at chello dot at 2015-05-22 18:20 ` foom at fuhm dot net [this message] 2015-05-25 13:23 ` ebotcazou at gcc dot gnu.org 2015-06-04 21:32 ` foom at fuhm dot net 2015-06-19 14:08 ` foom at fuhm dot net 2015-07-01 17:07 ` jason at gcc dot gnu.org 2015-07-01 17:59 ` jason at gcc dot gnu.org 2015-07-01 18:01 ` jason at gcc dot gnu.org 2015-07-01 18:07 ` jason at gcc dot gnu.org 2015-07-10 11:08 ` npl at chello dot at
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-65945-4-CYrw21ngtU@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).