aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorMartin Uecker <uecker@tugraz.at>2024-05-19 23:13:22 +0200
committerMartin Uecker <uecker@tugraz.at>2024-05-31 07:12:15 +0200
commit867d1264fe71d4291194373d1a1c409cac97a597 (patch)
treeb896fb85929496471c245be26c93ad6576266452 /gcc/tree-vectorizer.h
parent3a873c0a7bc8183de95a6103b507101a25eed413 (diff)
downloadgcc-867d1264fe71d4291194373d1a1c409cac97a597.zip
gcc-867d1264fe71d4291194373d1a1c409cac97a597.tar.gz
gcc-867d1264fe71d4291194373d1a1c409cac97a597.tar.bz2
C: allow aliasing of compatible types derived from enumeral types [PR115157]
Aliasing of enumeral types with the underlying integer is now allowed by setting the aliasing set to zero. But this does not allow aliasing of derived types which are compatible as required by ISO C. Instead, initially set structural equality. Then set TYPE_CANONICAL and update pointers and main variants when the type is completed (as done for structures and unions in C23). PR tree-optimization/115157 PR tree-optimization/115177 gcc/c/ * c-decl.cc (shadow_tag-warned,parse_xref_tag,start_enum, finish_enum): Set SET_TYPE_STRUCTURAL_EQUALITY / TYPE_CANONICAL. * c-objc-common.cc (get_alias_set): Remove special case. (get_aka_type): Add special case. gcc/c-family/ * c-attribs.cc (handle_hardbool_attribute): Set TYPE_CANONICAL for hardbools. gcc/ * godump.cc (go_output_typedef): Use TYPE_MAIN_VARIANT instead of TYPE_CANONICAL. gcc/testsuite/ * gcc.dg/enum-alias-1.c: New test. * gcc.dg/enum-alias-2.c: New test. * gcc.dg/enum-alias-3.c: New test. * gcc.dg/enum-alias-4.c: New test.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions