mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
65 lines
806 B
C
65 lines
806 B
C
$if (0):
|
|
$else:
|
|
$if (0):
|
|
$elif (0):
|
|
$elif (0):
|
|
$else:
|
|
int x = 1;
|
|
$endif;
|
|
$endif;
|
|
|
|
$if (0):
|
|
$assert(false);
|
|
$elif (0):
|
|
$assert(false);
|
|
$else:
|
|
$assert(true);
|
|
$endif;
|
|
|
|
$if (1):
|
|
$assert(true);
|
|
int d = 5;
|
|
$elif (0):
|
|
$assert(false);
|
|
$else:
|
|
$assert(false);
|
|
$endif;
|
|
|
|
$if (0):
|
|
$assert(true);
|
|
$elif (1):
|
|
$assert(true);
|
|
int c = 5;
|
|
$else:
|
|
$assert(false);
|
|
$endif;
|
|
|
|
$if (0):
|
|
$assert(true);
|
|
$elif (1):
|
|
$assert(true);
|
|
int b = 4;
|
|
$elif (0):
|
|
$assert(false);
|
|
$else:
|
|
$assert(false);
|
|
$endif;
|
|
|
|
$if (0):
|
|
$assert(true);
|
|
$elif (0):
|
|
$assert(false);
|
|
$elif (1):
|
|
$assert(true);
|
|
int a = 3;
|
|
$else:
|
|
$assert(false);
|
|
$endif;
|
|
|
|
// #expect: ct_if.ll
|
|
|
|
@ct_if.d = global i32 5, align 4
|
|
@ct_if.c = global i32 5, align 4
|
|
@ct_if.b = global i32 4, align 4
|
|
@ct_if.a = global i32 3, align 4
|
|
@ct_if.x = global i32 1, align 4 |