summaryrefslogtreecommitdiff
path: root/test/regression/sizeof1.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/regression/sizeof1.c')
-rw-r--r--test/regression/sizeof1.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/regression/sizeof1.c b/test/regression/sizeof1.c
index e8441a2..d7d37d3 100644
--- a/test/regression/sizeof1.c
+++ b/test/regression/sizeof1.c
@@ -1,3 +1,5 @@
+#include <stdio.h>
+
struct s {
char c;
union { int i[3]; double d; } n;
@@ -29,3 +31,13 @@ struct bits2 {
char b2[sizeof(struct bits2)]; /* should be 8 */
+int main()
+{
+ printf("sizeof(struct s) = %d, sizeof(tbl) = %d\n",
+ sizeof(struct s), sizeof(tbl));
+ printf("sizeof(struct bits1) = %d, sizeof(b1) = %d\n",
+ sizeof(struct bits1), sizeof(b1));
+ printf("sizeof(struct bits2) = %d, sizeof(b2) = %d\n",
+ sizeof(struct bits2), sizeof(b2));
+ return 0;
+}