diff options
author | Michael Forney <mforney@mforney.org> | 2020-01-31 13:41:04 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2020-01-31 13:41:04 -0800 |
commit | 8e47cf45dfed44627fa6f73f8734f2149c661044 (patch) | |
tree | fccff3d04878d23e441712ccab04a9202d31924e /test | |
parent | 41e862a6a2b193b6bab86bc29e2db3d42baa828a (diff) |
eval: Allow casting address constants to integer types in constant expressions
Diffstat (limited to 'test')
-rw-r--r-- | test/initializer-pointer-int-cast.c | 2 | ||||
-rw-r--r-- | test/initializer-pointer-int-cast.qbe | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/test/initializer-pointer-int-cast.c b/test/initializer-pointer-int-cast.c new file mode 100644 index 0000000..75963b2 --- /dev/null +++ b/test/initializer-pointer-int-cast.c @@ -0,0 +1,2 @@ +int x; +long p = (long)&x; diff --git a/test/initializer-pointer-int-cast.qbe b/test/initializer-pointer-int-cast.qbe new file mode 100644 index 0000000..a996882 --- /dev/null +++ b/test/initializer-pointer-int-cast.qbe @@ -0,0 +1,2 @@ +export data $p = align 8 { l $x, } +export data $x = align 4 { z 4 } |