[PATCH, PR d/87824] Committed return min_align_of_type from alignsize hook.

Iain Buclaw ibuclaw@gdcproject.org
Sat Nov 17 11:06:00 GMT 2018


Hi,

This patch addresses some of the failing tests on x86_64-linux/-m32.
The failing tests in question checked that data with 'long' was
sufficiently aligned.

  assert((&var.longfield % long.alignof) == 0);

Where long.alignof was replaced with the result of TYPE_ALIGN_UNIT.

The D language expects the minimum alignment from .alignof, so on -m32
alignof should return 4 instead of 8.

Bootstrapped and ran D2 testsuite on x86_64-linux-gnu with
{-m64,-m32/-mno-sse/-mno-mmx,-mx32} runtest flags.

Committed to trunk as r266234.

---
gcc/d/ChangeLog:

2018-11-17  Iain Buclaw  <ibuclaw@gdcproject.org>

    PR d/87824
    * d-target.cc (Target::alignsize): Return min_align_of_type.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dminalign.patch
Type: text/x-patch
Size: 397 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181117/25994ef5/attachment.bin>


More information about the Gcc-patches mailing list