add signed_bool_precision attribute for GIMPLE FE use
authorRichard Biener <rguenther@suse.de>
Fri, 11 Dec 2020 08:50:59 +0000 (09:50 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 6 Jan 2021 08:33:41 +0000 (09:33 +0100)
commitc9ee9c1e3553247c776f33eb0fe0aadee094a192
tree767a296e7aa92d2b27b3e0184c87fb5074a0d0e5
parenta05cc70a6c1ae0e5b22e16f4d8d13995a38ea1f9
add signed_bool_precision attribute for GIMPLE FE use

This adds __attribute__((signed_bool_precision(precision))) to be able
to construct nonstandard boolean types which for the included testcase
is needed to simulate Ada and LTO interaction (Ada uses a 8 bit
precision boolean_type_node).  This will also be useful for vector
unit testcases where we need to produce vector types with
non-standard precision signed boolean type components.

2021-01-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/95582
gcc/c-family/
* c-attribs.c (c_common_attribute_table): Add entry for
signed_bool_precision.
(handle_signed_bool_precision_attribute): New.

gcc/testsuite/
* gcc.dg/pr95582.c: New testcase.
gcc/c-family/c-attribs.c
gcc/testsuite/gcc.dg/pr95582.c [new file with mode: 0644]