diff options
author | Michael Forney <mforney@mforney.org> | 2019-03-12 18:43:14 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-03-12 18:44:40 -0700 |
commit | cd1c07667495e7dd991cfcd0637eddf2bb65eac9 (patch) | |
tree | 98678662672376b2ab3f6c59a83eb511306200fc /tests | |
parent | 842176df9208931f62d5e3dd62825fe04b9ae44d (diff) | |
download | cproc-cd1c07667495e7dd991cfcd0637eddf2bb65eac9.tar.xz |
Implement __builtin_constant_p
Diffstat (limited to 'tests')
-rw-r--r-- | tests/builtin-constant-p.c | 3 | ||||
-rw-r--r-- | tests/builtin-constant-p.qbe | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/builtin-constant-p.c b/tests/builtin-constant-p.c new file mode 100644 index 0000000..fa16ed3 --- /dev/null +++ b/tests/builtin-constant-p.c @@ -0,0 +1,3 @@ +int f(void); +int x = __builtin_constant_p(1+2*3); +int y = __builtin_constant_p(f()); diff --git a/tests/builtin-constant-p.qbe b/tests/builtin-constant-p.qbe new file mode 100644 index 0000000..f92388f --- /dev/null +++ b/tests/builtin-constant-p.qbe @@ -0,0 +1,2 @@ +export data $x = align 4 { w 1, } +export data $y = align 4 { w 0, } |