diff options
author | Martin Uecker <uecker@tugraz.at> | 2024-01-20 19:03:57 +0100 |
---|---|---|
committer | Martin Uecker <uecker@tugraz.at> | 2024-01-21 18:58:49 +0100 |
commit | 1ead42f9836a13cbbe6a2be685f76750583ae320 (patch) | |
tree | 94315f26718cef2ede0fc1e66672be1c73c31315 /gcc/expr.cc | |
parent | a57439d61937925cec48df6166b2a805ae7054d5 (diff) | |
download | gcc-1ead42f9836a13cbbe6a2be685f76750583ae320.zip gcc-1ead42f9836a13cbbe6a2be685f76750583ae320.tar.gz gcc-1ead42f9836a13cbbe6a2be685f76750583ae320.tar.bz2 |
C23: Fix ICE for composite type for structs with unsigned bitfields [PR113492]
This patch fixes a bug when forming a composite type from structs that
contain an unsigned bitfield declared with int while using -funsigned-bitfields.
In such structs the unsigned integer type was not compatible to the
regular unsigned integer type used elsewhere in the C FE.
PR c/113492
gcc/c:
* c-decl.cc (grokdeclarator): Use c_common_unsigned_type instead of
unsigned_type_for to create the unsigned type for bitfields declared
with int when using -funsigned-bitfields.
gcc/testsuite:
* gcc.dg/pr113492.c: New test.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions