Skip to content

Commit 68b3f39

Browse files
author
Nikita Kraiouchkine
committed
EXP43-C: add test-case and update expected results
1 parent 5f09408 commit 68b3f39

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| test.c:53:3:53:6 | call to copy | Call to 'copy' passes an aliased pointer to a restrict-qualified parameter. |
2-
| test.c:58:3:58:6 | call to copy | Call to 'copy' passes an aliased pointer to a restrict-qualified parameter. |
3-
| test.c:64:3:64:8 | call to strcpy | Call to 'strcpy' passes an aliased pointer to a restrict-qualified parameter. |
4-
| test.c:71:3:71:8 | call to memcpy | Call to 'memcpy' passes an aliased pointer to a restrict-qualified parameter. |
5-
| test.c:84:3:84:7 | call to scanf | Call to 'scanf' passes an aliased pointer to a restrict-qualified parameter. |
1+
| test.c:59:3:59:6 | call to copy | Call to 'copy' passes an aliased pointer to a restrict-qualified parameter. |
2+
| test.c:64:3:64:6 | call to copy | Call to 'copy' passes an aliased pointer to a restrict-qualified parameter. |
3+
| test.c:70:3:70:8 | call to strcpy | Call to 'strcpy' passes an aliased pointer to a restrict-qualified parameter. |
4+
| test.c:77:3:77:8 | call to memcpy | Call to 'memcpy' passes an aliased pointer to a restrict-qualified parameter. |
5+
| test.c:90:3:90:7 | call to scanf | Call to 'scanf' passes an aliased pointer to a restrict-qualified parameter. |
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| test.c:16:22:16:23 | i2 | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:16:17:16:18 | i3 | i3 |
2-
| test.c:17:8:17:9 | g2 | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:5:15:5:16 | g1 | g1 |
3-
| test.c:18:8:18:9 | i2 | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:14:17:14:18 | i1 | i1 |
4-
| test.c:26:10:26:11 | g1 | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:20:19:20:20 | i4 | i4 |
5-
| test.c:33:22:33:26 | & ... | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:33:17:33:18 | px | px |
6-
| test.c:40:10:40:14 | & ... | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:35:19:35:20 | py | py |
1+
| test.c:18:22:18:23 | i2 | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:18:17:18:18 | i3 | i3 |
2+
| test.c:19:8:19:9 | g2 | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:5:15:5:16 | g1 | g1 |
3+
| test.c:20:8:20:9 | i2 | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:16:17:16:18 | i1 | i1 |
4+
| test.c:28:10:28:11 | g1 | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:22:19:22:20 | i4 | i4 |
5+
| test.c:39:22:39:26 | & ... | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:39:17:39:18 | px | px |
6+
| test.c:46:10:46:14 | & ... | Assignment to restrict-qualified pointer $@ results in pointer aliasing. | test.c:41:19:41:20 | py | py |

c/cert/test/rules/EXP43-C/test.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
int *restrict g1;
66
int *restrict g2;
7+
int *restrict g1_1;
8+
int *g2_1;
79

810
struct s1 {
911
int x, y, z;
@@ -28,6 +30,10 @@ void test_global_local() {
2830
}
2931
}
3032

33+
void test_global_local_1() {
34+
g1_1 = g2_1; // COMPLIANT
35+
}
36+
3137
void test_structs() {
3238
struct s1 *restrict p1 = &v1;
3339
int *restrict px = &v1.x; // NON_COMPLIANT

0 commit comments

Comments
 (0)