summaryrefslogtreecommitdiff
path: root/test/regression/sizeof1.c
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-03-15 12:41:45 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-03-15 12:41:45 +0000
commitffd6080f9e1e742c73ac38354b31c6fc4e3963ba (patch)
tree48466e94e6ae8a8f7fa50c8fcf4ffb610d6dbed1 /test/regression/sizeof1.c
parentb6a2f5a9177892fa325e35a845c593902f6f203e (diff)
Revised handling of sizeof(string-literal)
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1611 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
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;
+}