https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97000
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- At asyncwait-1.xnvptx-none.mkoffload.179t.slsr, we have the valid: ... <bb 2> [local count: 87490071]: _14 = .UNIQUE (OACC_FORK, 0, 2); _75 = .GOACC_DIM_SIZE (0); _76 = .GOACC_DIM_POS (0); _77 = .GOACC_DIM_POS (2); _60 = _75 * 32; _61 = _60 + 63; _63 = _61 / _60; _44 = _63 * _76; _65 = _44 * 32; _19 = _65 + _77; _71 = _63 * 32; _72 = _19 + _71; _20 = MIN_EXPR <_72, 64>; if (_19 < _20) goto <bb 4>; [27.00%] else goto <bb 3>; [73.00%] <bb 3> [local count: 437450366]: .UNIQUE (OACC_JOIN, _14, 2); return; ... and at asyncwait-1.xnvptx-none.mkoffload.181t.tracer, we have in addition: ... <bb 4> [local count: 373582614]: .UNIQUE (OACC_JOIN, _14, 2); return; ... which causes the ICE. There's some code in ignore_bb_p in tracer.c to stop this from happening. But it doesn't work, because it only checks for .UNIQUE in the last stmt in the bb, while in bb3 the last is a return (and in bb2, the .UNIQUE is the first stmt).