[Bug d/106977] [13 regression] d21 dies with SIGBUS on 32-bit Darwin

ibuclaw at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 23 23:11:22 GMT 2023


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

--- Comment #13 from ibuclaw at gcc dot gnu.org ---
Confirmed, D is doing NRVO return whereas C++ isn't.

gdc-11 codegen of the `visible` method:

---
struct Visibility visible (struct AggregateDeclaration * const this)
{
  return <retval> = this->visibility;
}
---

vs. gdc-mainline
---
struct Visibility visible (struct AggregateDeclaration * const this)
{
  <retval> = this->visibility;
  return <retval>;
}
---


More information about the Gcc-bugs mailing list