re PR c/88928 (ICE segfault in check_address_or_pointer_of_packed_member since r268075)
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 21 Jan 2019 17:12:09 +0000 (17:12 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Mon, 21 Jan 2019 17:12:09 +0000 (17:12 +0000)
commitf3a18a5c6cb1fed68ea519f731c8078af2f2f657
treec0fe35267116ff647019a5081d6f5c3a4a6f3d41
parent0fba41e0f0b1fd1db24709577564866dec047c3b
re PR c/88928 (ICE segfault in check_address_or_pointer_of_packed_member since r268075)

2019-01-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c/88928
        * c-warn.c (check_alignment_of_packed_member): Add a boolean parameter
        for rvalue context.  Handle rvalues correctly.  Use min_align_of_type
        instead of TYPE_ALIGN.
        (check_address_or_pointer_of_packed_member): Handle rvalues coorrectly.
        Use min_align_of_type instead of TYPE_ALIGN_UNIT.  Check for NULL
        pointer from TYPE_STUB_DECL.

testsuite:
2019-01-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c/88928
        * c-c++-common/Waddress-of-packed-member-1.c: New test case.
        * gcc.dg/pr88928.c: New test case.

From-SVN: r268118
gcc/ChangeLog
gcc/c-family/c-warn.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Waddress-of-packed-member-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr88928.c [new file with mode: 0644]