Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.target/riscv/call-with-empty-struct.H @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
#define MAKE_STRUCT_PASSING_TEST(type,val) \ static struct struct_ ## type ## _t \ { \ struct { } e; \ struct { type f; } s; \ } global_struct_ ## type = { {}, { val } }; \ \ static bool \ check_struct_ ## type (struct_ ## type ## _t obj) \ { \ return (obj.s.f == global_struct_ ## type .s.f); \ } \ \ int \ main () \ { \ bool result = check_struct_ ## type ( global_struct_ ## type ); \ return result ? 0 : 1; \ }