Fix PR c++/68711 - [6 regression] SEGV on an invalid offsetof of a member
authorMartin Sebor <msebor@redhat.com>
Wed, 9 Dec 2015 01:35:59 +0000 (01:35 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Wed, 9 Dec 2015 01:35:59 +0000 (18:35 -0700)
commit1a161cd7a7545318c1ee29dfd2eb76ee6ee9f43e
tree9d92fe8e1f3fe6ebcfa909771bb950bd93fef15c
parent9ba300b1a53cbce4924f0e392135b4cdf0ee9fdd
Fix PR c++/68711 - [6 regression] SEGV on an invalid offsetof of a member
of a virtual base.

gcc/testsuite/ChangeLog:
* g++.dg/other/offsetof8.C: New test.

gcc/cp/ChangeLog:
* typeck.c (build_class_member_access_expr): Strip NOPs before
        testing a potentially null operand for equality to zero.

From-SVN: r231437
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/offsetof8.C [new file with mode: 0644]