re PR c/71598 (Wrong optimization with aliasing enums)
authorRichard Biener <rguenther@suse.de>
Mon, 1 Apr 2019 07:16:38 +0000 (07:16 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 1 Apr 2019 07:16:38 +0000 (07:16 +0000)
commit2a82beaa820410600441f36e49e91a3a18e04fc5
tree490cacb54993cc607e3f50a0411bec1e99e8f8b3
parentacf8e57ae2ee28123fc04ce26635963751851824
re PR c/71598 (Wrong optimization with aliasing enums)

2019-04-01  Richard Biener  <rguenther@suse.de>

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/ChangeLog
gcc/c/ChangeLog
gcc/c/c-objc-common.c
gcc/c/c-objc-common.h
gcc/c/c-tree.h
gcc/gimple.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr71598-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr71598-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr71598-3.c [new file with mode: 0644]