aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/gcc
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-11-02 04:55:10 +0100
committerTristan Gingold <tgingold@free.fr>2017-11-02 04:55:10 +0100
commit1c1ca0a5e7c6ba9427db3d24167545d5cada9085 (patch)
tree9569c564e5eadfdc667a8441d6a5a642275cf9b6 /src/ortho/gcc
parent4ed8007a1e53ceae41caa49618a5c4c7cf7c5fa9 (diff)
downloadghdl-1c1ca0a5e7c6ba9427db3d24167545d5cada9085.tar.gz
ghdl-1c1ca0a5e7c6ba9427db3d24167545d5cada9085.tar.bz2
ghdl-1c1ca0a5e7c6ba9427db3d24167545d5cada9085.zip
gcc-7: fix crash due to alias_set.
Diffstat (limited to 'src/ortho/gcc')
-rw-r--r--src/ortho/gcc/ortho-lang-7.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ortho/gcc/ortho-lang-7.c b/src/ortho/gcc/ortho-lang-7.c
index d378a2a3e..28df56c07 100644
--- a/src/ortho/gcc/ortho-lang-7.c
+++ b/src/ortho/gcc/ortho-lang-7.c
@@ -575,6 +575,15 @@ ortho_truthvalue_conversion (tree expr)
}
}
+/* Do not deal with alias set. In particular, it doesn't work well with
+ incomplete type, and universal pointers are not expressed in ortho. */
+
+static alias_set_type
+ortho_get_alias_set (tree type)
+{
+ return 0;
+}
+
/* The following function has been copied and modified from c-convert.c. */
/* Change of width--truncation and extension of integers or reals--
@@ -746,6 +755,9 @@ type_for_mode (enum machine_mode mode, int unsignedp)
#undef LANG_HOOKS_GETDECLS
#define LANG_HOOKS_GETDECLS hook_tree_void_null
+#undef LANG_HOOKS_GET_ALIAS_SET
+#define LANG_HOOKS_GET_ALIAS_SET ortho_get_alias_set
+
struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
union GTY((desc ("0"),