c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is enabled, define __SIZETYPE__.

2019-08-15  Richard Biener  <rguenther@suse.de>

	c-family/
	* c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
	enabled, define __SIZETYPE__.

	* gcc.dg/pr80170.c: Adjust to use __SIZETYPE__.

From-SVN: r274528
This commit is contained in:
Richard Biener 2019-08-15 11:26:19 +00:00 committed by Richard Biener
parent 3b45ae635c
commit 21c1e20566
4 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2019-08-15 Richard Biener <rguenther@suse.de>
* c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
enabled, define __SIZETYPE__.
2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
* c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add

View File

@ -5148,6 +5148,10 @@ c_stddef_cpp_builtins(void)
builtin_define_with_value ("__INTPTR_TYPE__", INTPTR_TYPE, 0);
if (UINTPTR_TYPE)
builtin_define_with_value ("__UINTPTR_TYPE__", UINTPTR_TYPE, 0);
/* GIMPLE FE testcases need access to the GCC internal 'sizetype'.
Expose it as __SIZETYPE__. */
if (flag_gimple)
builtin_define_with_value ("__SIZETYPE__", SIZETYPE, 0);
}
static void

View File

@ -1,3 +1,7 @@
2019-08-15 Richard Biener <rguenther@suse.de>
* gcc.dg/pr80170.c: Adjust to use __SIZETYPE__.
2019-08-15 Richard Sandiford <richard.sandiford@arm.com>
* gcc.target/aarch64/sve/loop_add_4.c: Expect 10 INCWs and

View File

@ -24,11 +24,7 @@ NullB (void * misalignedPtr)
struct B * b;
bb_2:
#if __SIZEOF_LONG__ == 8
b_2 = misalignedPtr_1(D) + 18446744073709551608ul;
#else
b_2 = misalignedPtr_1(D) + 4294967292ul;
#endif
b_2 = misalignedPtr_1(D) + _Literal (__SIZETYPE__) -__SIZEOF_POINTER__;
__MEM <struct B> (b_2).a.a = _Literal (void *) 0;
__MEM <struct B> (b_2).a.b = _Literal (void *) 0;
return;