blob: daca70a6fe4c24ee3e075c90cf1fbde69669c605 [file] [log] [blame]
// PR c++/68711 - [5 regression] SEGV on an invalid offsetof of a member
// of a virtual base
// { dg-do compile }
struct A { int i; };
struct B: virtual A { };
int a[] = {
!&((B*)0)->i, // { dg-error "invalid access to non-static data member" }
__builtin_offsetof (B, i) // { dg-error "invalid access to non-static" }
};