aboutsummaryrefslogtreecommitdiffstats
path: root/test/regression/bitfields9.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-07-08 12:04:28 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2015-07-08 12:04:28 +0200
commit52c6be30048bf9b77b9dd6bc66f052ee5386f16e (patch)
tree87ab50782e40116d4b23b6f61d90030d304993dd /test/regression/bitfields9.c
parentab1ddcd0d579d7e5760c6cfa84adbd55212c47e7 (diff)
parentf869da75c970aec78975f7154c806f29e3012b7a (diff)
downloadcompcert-kvx-52c6be30048bf9b77b9dd6bc66f052ee5386f16e.tar.gz
compcert-kvx-52c6be30048bf9b77b9dd6bc66f052ee5386f16e.zip
Merge branch 'master' of https://github.com/AbsInt/CompCert
Diffstat (limited to 'test/regression/bitfields9.c')
-rw-r--r--test/regression/bitfields9.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/regression/bitfields9.c b/test/regression/bitfields9.c
index b33c4064..be87057b 100644
--- a/test/regression/bitfields9.c
+++ b/test/regression/bitfields9.c
@@ -9,7 +9,7 @@ struct s {
struct t {
unsigned int c: 16;
- unsigned int d: 1;
+ _Bool d: 1;
short e: 8;
};
@@ -25,25 +25,25 @@ void print_t(char * msg, struct t p)
/* Global initialization */
struct s glob_s = { -12, 1 };
-struct t glob_t = { 123, 0, -45 };
+struct t glob_t = { 123, 2, -45 };
/* Local initialization */
-void f(int x, int y)
+void f(int x, int y, int z)
{
struct s loc_s = { x, y };
- struct t loc_t = { x, 1, y };
+ struct t loc_t = { x, z, y };
print_s("loc_s", loc_s);
print_t("loc_t", loc_t);
print_s("compound_s", (struct s) { y, x });
- print_t("compound_t", (struct t) { y, 0, -x });
+ print_t("compound_t", (struct t) { y, ~z, -x });
}
int main()
{
print_s("glob_s", glob_s);
print_t("glob_t", glob_t);
- f(11, 2);
- f(7, 50);
+ f(11, 2, 3);
+ f(7, 50, 2);
return 0;
}