https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89331
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-02-13 CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org Target Milestone|--- |8.3 Summary|internal compiler error: in |[8/9 Regression] internal |build_simple_base_path, at |compiler error: in |cp/class.c:589 |build_simple_base_path, at | |cp/class.c:589 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This used to be rejected (on the trunk until r260782, where it started ICEing, on 8.x branch without giving any errors first, on the trunk as error recovery ICE with pr89331.C:2:71: error: cannot convert from ‘B’ to base class ‘A’ because ‘B’ is incomplete 2 | struct B : public A { static constexpr int b = __builtin_offsetof (B, a); }; | ^ pr89331.C:2:71: internal compiler error: in build_class_member_access_expr, at cp/typeck.c:2480 0xb108bc build_class_member_access_expr(cp_expr, tree_node*, tree_node*, bool, int) ../../gcc/cp/typeck.c:2480 0xb128cc finish_class_member_access_expr(cp_expr, tree_node*, bool, int) ../../gcc/cp/typeck.c:3001 Simplified testcase: struct A { char a; }; struct B : public A { static constexpr int b = __builtin_offsetof (B, a); }; clang rejects this too, not really sure if it is valid or not.