Bug 67842

Summary: Incorrect check in sese.h:bb_in_region
Product: gcc Reporter: Mikhail Maltsev <miyuki>
Component: tree-optimizationAssignee: Not yet assigned to anyone <unassigned>
Severity: normal CC: spop
Priority: P3 Keywords: ice-checking
Version: 6.0   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description Mikhail Maltsev 2015-10-04 17:58:02 UTC
From discussion on the mailing list: https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00615.html

The function bb_in_region contains the following check guarded by ENABLE_CHECKING:

    edge e;
    edge_iterator ei;

    /* Check that there are no edges coming in the region: all the
       predecessors of EXIT are dominated by ENTRY.  */
    FOR_EACH_EDGE (e, ei, exit->preds)
      dominated_by_p (CDI_DOMINATORS, e->src, entry);

dominated_by_p is a pure function, so the check has no effect. If it is changed to
      gcc_assert (dominated_by_p (CDI_DOMINATORS, e->src, entry));

It starts to ICE on several testcases, for example gcc.dg/graphite/block-1.c.
Comment 1 AK 2015-12-25 01:26:47 UTC
This check is irrelevant now. I'll put up a patch to remove this check.
Comment 2 Richard Biener 2017-12-14 14:53:39 UTC
Comment 3 Richard Biener 2017-12-14 14:54:12 UTC
Author: rguenth
Date: Thu Dec 14 14:53:40 2017
New Revision: 255636

URL: https://gcc.gnu.org/viewcvs?rev=255636&root=gcc&view=rev
2017-12-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67842
	* sese.h (bb_in_region): Remove #if 0'ed code.