History

Undo part of incr_offset patch.

The incr_offset offset code was not working with bounds checking. So I reverted part of tccgen.c. See new test code 132. Also added some debugging code that prints location of bounds checking calls. Needed this to find the problem. See lib/bcheck.c, lib/bt-dll.c, lib/bt-exe.c, lib/bt-log.c, tccrun.c

herman ten brugge committed 3 years ago

Commit 598134f1 parent d1c10778 files · +96 −5Browse files

Showing the changes to tests (2 of 8 files). Show all

Unified · Split

2 files
  1. tests/tests2/132_bound_test.c +29 −0
  2. tests/tests2/132_bound_test.expect +1 −0
tests/tests2/132_bound_test.c+29−0
@@ -0,0 +1,29 @@
1#include <stdio.h>
2#include <float.h>
3
4union ieee_double_extract
5{
6 struct {
7 unsigned int manl:32;
8 unsigned int manh:20;
9 unsigned int exp:11;
10 unsigned int sig:1;
11 } s;
12 double d;
13};
14
15double scale(double d)
16{
17 union ieee_double_extract x;
18
19 x.d = d;
20 x.d *= 1000;
21 return x.d;
22}
23
24int
25main(void)
26{
27 printf("%g\n", scale(42));
28 return 0;
29}
tests/tests2/132_bound_test.expect+1−0
@@ -0,0 +1 @@
142000

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t