From 2a82beaa820410600441f36e49e91a3a18e04fc5 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 1 Apr 2019 07:16:38 +0000 Subject: re PR c/71598 (Wrong optimization with aliasing enums) 2019-04-01 Richard Biener PR c/71598 * gimple.c: Include langhooks.h. (gimple_get_alias_set): Treat enumeral types as the underlying integer type. c/ * c-tree.h (c_get_alias_set): Declare. * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set. * c-objc-common.c (c_get_alias_set): Treat enumeral types as the underlying integer type. * gcc.dg/torture/pr71598-1.c: New testcase. * gcc.dg/torture/pr71598-2.c: Likewise. * gcc.dg/torture/pr71598-3.c: Likewise. From-SVN: r270052 --- gcc/c/c-objc-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/c/c-objc-common.h') diff --git a/gcc/c/c-objc-common.h b/gcc/c/c-objc-common.h index 7a90c77..f5e8204 100644 --- a/gcc/c/c-objc-common.h +++ b/gcc/c/c-objc-common.h @@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see #undef LANG_HOOKS_POST_OPTIONS #define LANG_HOOKS_POST_OPTIONS c_common_post_options #undef LANG_HOOKS_GET_ALIAS_SET -#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set +#define LANG_HOOKS_GET_ALIAS_SET c_get_alias_set #undef LANG_HOOKS_PARSE_FILE #define LANG_HOOKS_PARSE_FILE c_common_parse_file #undef LANG_HOOKS_FINISH_INCOMPLETE_DECL -- cgit v1.1