c/89270 - honor registered_builtin_types in type_for_size
commit4dd02d62abd76a69f65d9f3fed6febeed53fc90a
authorRichard Biener <rguenther@suse.de>
Mon, 4 Dec 2023 13:03:37 +0000 (4 14:03 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 5 Dec 2023 07:31:32 +0000 (5 08:31 +0100)
treef863cb2f0737c8f2137e477cafb2a08e27b75a8e
parente00c00730912cd6072954cd2c29ca44e33dbb598
c/89270 - honor registered_builtin_types in type_for_size

The following fixes the intermediate conversions inserted by
convert_to_integer when facing address-spaces and converts
to their effective [u]intptr_t when they are registered_builtin_types
by considering those also from c_common_type_for_size and not
only from c_common_type_for_mode.

PR c/89270
gcc/c-family/
* c-common.cc (c_common_type_for_size): Consider
registered_builtin_types.

gcc/testsuite/
* gcc.target/avr/pr89270.c: New testcase.
gcc/c-family/c-common.cc
gcc/testsuite/gcc.target/avr/pr89270.c [new file with mode: 0644]