[Bug c++/92504] [9/10 Regression] ICE on gcc-9 -fopenmp: internal compiler error: tree check: expected tree that contains 'decl common' structure, have 'baselink' in get_inner_reference, at expr.c:7238
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 14 12:03:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92504
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly more valid testcase:
struct A { void foo (); A (); A (const A &); A & operator++ (); int a; };
void
bar ()
{
A a;
#pragma omp for
for (auto b = a; b != a.foo; ++b)
;
}
I believe the actual problem is that r230364 added a cond = cp_fully_fold
(cond);
before the handling and cp_fully_fold doesn't handle well invalid code, it is
assumed it is only called on code that has been previously validated.
The reason it only ICEs since r265930 is that before != was not a valid
condition comparison, and with < instead during folding we don't go into the
problematic paths that ICE.
I'll need to find out what breaks if that cond = cp_fully_fold (cond); is
either removed or moved after the verification.
More information about the Gcc-bugs
mailing list