commit 2b616739bf590b1f3cbf3740e5b60e1b56e5edd2 parent c090b15bd2998ec3d1c51956dcbd3a9dc10e8328 Author: Roberto E. Vargas Caballero <k0ga@shike2.net> Date: Fri, 1 May 2026 11:35:30 +0200 tests/cc Add 0272-div Diffstat:
| M | tests/cc/execute/.gitignore | | | 1 | + |
| A | tests/cc/execute/0272-div.c | | | 15 | +++++++++++++++ |
| M | tests/cc/execute/scc-tests.lst | | | 1 | + |
3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/tests/cc/execute/.gitignore b/tests/cc/execute/.gitignore @@ -4,3 +4,4 @@ tmp_*.c a.out 0270-union 0271-struct +0272-div diff --git a/tests/cc/execute/0272-div.c b/tests/cc/execute/0272-div.c @@ -0,0 +1,15 @@ +double g = 3.0; + +int +main(void) +{ + float f; + double d; + + f = g / 4; + d = g / 3; + + if (f == 0 || f == 0) + return 1; + return 0; +} diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst @@ -262,3 +262,4 @@ 0269-extern.c 0270-union.c 0271-struct.c +0272-div.c