Bug 67842 - Incorrect check in sese.h:bb_in_region
Summary: Incorrect check in sese.h:bb_in_region
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-checking
Depends on:
Blocks:
 
Reported: 2015-10-04 17:58 UTC by Mikhail Maltsev
Modified: 2017-12-14 14:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
"Fixed."
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
Log:
2017-12-14  Richard Biener  <rguenther@suse.de>

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

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/sese.h