mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Compile time fmod evaluates to 0 #1195
This commit is contained in:
17
test/test_suite/compile_time/mod_ct.c3t
Normal file
17
test/test_suite/compile_time/mod_ct.c3t
Normal file
@@ -0,0 +1,17 @@
|
||||
// #target: macos-x64
|
||||
module test;
|
||||
fn int main()
|
||||
{
|
||||
double a = 4.5 % 5;
|
||||
double b = -4.5 % 5;
|
||||
int ai = 4 % 5;
|
||||
int bi = -4 % 5;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* #expect: test.ll
|
||||
|
||||
store double 4.500000e+00, ptr %a, align 8
|
||||
store double -4.500000e+00, ptr %b, align 8
|
||||
store i32 4, ptr %ai, align 4
|
||||
store i32 -4, ptr %bi, align 4
|
||||
Reference in New Issue
Block a user