diff options
| author | gingerBill <ginger.bill.22@gmail.com> | 2016-08-01 00:34:15 +0100 |
|---|---|---|
| committer | gingerBill <ginger.bill.22@gmail.com> | 2016-08-01 00:34:15 +0100 |
| commit | 88e05ad2b25b51ad3f5dd92554ffbfa3eeaa57b9 (patch) | |
| tree | f4aa339987a8aa05a86bfa410503200dfa7d72b7 /examples | |
| parent | 70f6282f41cdd7f500159116c520140364f6739a (diff) | |
Basic Comparisons
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/test.c | 2 | ||||
| -rw-r--r-- | examples/test.ll | 14 | ||||
| -rw-r--r-- | examples/test.odin | 5 |
3 files changed, 3 insertions, 18 deletions
diff --git a/examples/test.c b/examples/test.c index 6128d4e54..84a4f9a08 100644 --- a/examples/test.c +++ b/examples/test.c @@ -1,4 +1,6 @@ int main() { float a = 0.5; + float b = 1.5; + int c = a < b; return 0; } diff --git a/examples/test.ll b/examples/test.ll index ab38f5331..9835e90a7 100644 --- a/examples/test.ll +++ b/examples/test.ll @@ -2,19 +2,5 @@ define void @main() { entry: %0 = alloca i64, align 8 ; a store i64 zeroinitializer, i64* %0 - %1 = alloca i64, align 8 ; b - store i64 zeroinitializer, i64* %1 - store i64 1, i64* %0 - store i64 2, i64* %1 - %2 = load i64, i64* %0 - %3 = add i64 %2, 1 - store i64 %3, i64* %0 - %4 = load i64, i64* %1 - %5 = add i64 %4, 1 - store i64 %5, i64* %1 - %6 = load i64, i64* %1 - %7 = load i64, i64* %0 - %8 = add i64 %7, %6 - store i64 %8, i64* %0 ret void } diff --git a/examples/test.odin b/examples/test.odin index 8732d307e..962b48057 100644 --- a/examples/test.odin +++ b/examples/test.odin @@ -1,6 +1,3 @@ main :: proc() { - a, b := 1, 2; - a++; - b++; - a += b; + a : int; } |