From 1c1ca0a5e7c6ba9427db3d24167545d5cada9085 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 2 Nov 2017 04:55:10 +0100 Subject: gcc-7: fix crash due to alias_set. --- src/ortho/gcc/ortho-lang-7.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ortho') 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"), -- cgit v1.2.3