Bug 86724 - Compilation error with new isl 0.20 (missing includes)
Summary: Compilation error with new isl 0.20 (missing includes)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 8.2.0
: P3 normal
Target Milestone: 7.4
Assignee: Richard Biener
URL:
Keywords:
: 86890 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-29 15:56 UTC by Rainer Jung
Modified: 2024-01-20 17:14 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 7.3.1, 8.2.1, 9.0
Known to fail: 6.4.0, 7.3.0, 8.2.0
Last reconfirmed: 2018-07-30 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Jung 2018-07-29 15:56:36 UTC
Compilation of 8.2.0 breaks in gcc/graphite-isl-ast-to-gimple.c

.../graphite-isl-ast-to-gimple.c:83:7: error: 'isl_id_free' was not declared in this scope
.../graphite-isl-ast-to-gimple.c:262:3: error: 'isl_id_free' was not declared in this scope
.../graphite-isl-ast-to-gimple.c:598:5: error: 'isl_id_free' was not declared in this scope
.../graphite-isl-ast-to-gimple.c:638:53: error: 'isl_id_get_user' was not declared in this scope
.../graphite-isl-ast-to-gimple.c:641:7: error: 'isl_id_free' was not declared in this scope
.../graphite-isl-ast-to-gimple.c:802:31: error: 'isl_id_get_user' was not declared in this scope
.../graphite-isl-ast-to-gimple.c:808:3: error: 'isl_id_free' was not declared in this scope
.../graphite-isl-ast-to-gimple.c:1367:19: error: 'isl_space_dim' was not declared in this scope
.../graphite-isl-ast-to-gimple.c:1371:3: error: 'isl_space_free' was not declared in this scope
.../graphite-isl-ast-to-gimple.c:1372:16: error: 'isl_id_alloc' was not declared in this scope

In isl 0.19, other isl header files already included by gcc/graphite.h included the isl header file id.h and space.h. In 0.20 this is no longer the case.

Proposed patch:

--- .../gcc/graphite.h 2018-01-03 11:03:58.000000000 +0000
+++ .../gcc/graphite.h 2018-07-29 17:42:55.836121000 +0000
@@ -37,6 +37,8 @@
 #include <isl/schedule.h>
 #include <isl/ast_build.h>
 #include <isl/schedule_node.h>
+#include <isl/id.h>
+#include <isl/space.h>

 typedef struct poly_dr *poly_dr_p;

Regards,

Rainer
Comment 1 Rainer Jung 2018-07-29 16:03:54 UTC
For the sake of completeness, I think the following isl change removed the implicit include chain that made the code work before isl 0.20:

http://repo.or.cz/isl.git/commitdiff/406f2e9e067adb901c45284c65bfdc32e29a1383

Before several already included isl header files included isl/local_space.h which itself included the needed isl/space.h which in turn included the needed isl/id.h. After the change, isl/local_space.h no longer includes space.h.
Comment 2 Richard Biener 2018-07-30 09:36:03 UTC
I'll see to fix this.
Comment 3 Richard Biener 2018-08-01 07:21:40 UTC
Author: rguenth
Date: Wed Aug  1 07:21:08 2018
New Revision: 263193

URL: https://gcc.gnu.org/viewcvs?rev=263193&root=gcc&view=rev
Log:
2018-08-01  Richard Biener  <rguenther@suse.de>

	PR bootstrap/86724
	* graphite.h: Include isl/id.h and isl/space.h to allow build
	with ISL 0.20.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/graphite.h
Comment 4 Richard Biener 2018-08-01 08:06:51 UTC
Author: rguenth
Date: Wed Aug  1 08:06:20 2018
New Revision: 263194

URL: https://gcc.gnu.org/viewcvs?rev=263194&root=gcc&view=rev
Log:
2018-08-01  Richard Biener  <rguenther@suse.de>

	PR bootstrap/86724
	* graphite.h: Include isl/id.h and isl/space.h to allow build
	with ISL 0.20.

Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/graphite.h
Comment 5 Richard Biener 2018-08-01 08:07:48 UTC
Author: rguenth
Date: Wed Aug  1 08:07:16 2018
New Revision: 263195

URL: https://gcc.gnu.org/viewcvs?rev=263195&root=gcc&view=rev
Log:
2018-08-01  Richard Biener  <rguenther@suse.de>

	PR bootstrap/86724
	* graphite.h: Include isl/id.h and isl/space.h to allow build
	with ISL 0.20.

Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/graphite.h
Comment 6 Richard Biener 2018-08-01 08:08:08 UTC
Fixed for GCC 7.4+.
Comment 7 Andrew Pinski 2018-08-08 16:33:59 UTC
*** Bug 86890 has been marked as a duplicate of this bug. ***
Comment 8 Matthias Klose 2018-08-14 15:16:15 UTC
Author: doko
Date: Tue Aug 14 15:15:39 2018
New Revision: 263539

URL: https://gcc.gnu.org/viewcvs?rev=263539&root=gcc&view=rev
Log:
2018-08-14  Matthias Klose  <doko@ubuntu.com>

        Backport from mainline
        2018-08-01  Richard Biener  <rguenther@suse.de>

        PR bootstrap/86724
        * graphite.h: Include isl/id.h and isl/space.h to allow build
        with ISL 0.20.

Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/graphite.h