Skip to content
Snippets Groups Projects
Commit 50d6281f authored by Tristan Le Gall's avatar Tristan Le Gall
Browse files

[alias] changed comment in tests files to include actual results

parent 67b7a097
No related branches found
No related tags found
No related merge requests found
Showing
with 41 additions and 48 deletions
// single pointer assignment
// { a; b; c; d } are aliased
// { *a; *b; *c; *d } are aliased
// {a, b, c, d} are aliased
int main () {
......
// double pointer assignment
// { *b; *d } are aliased
// { a; c } are aliased
// { b; d; *a; *d } are aliased
// {a, c} are aliased
// {*a, *c, b, d} are aliased
int main () {
......
// address assignment
// { a; c } are aliased
// { *a; *c } are aliased
// {a, c} are aliased
int main () {
......
// double pointer assignment
// { *b; *d } are aliased
// { b; d; *a; *c } are aliased
// {a, c} are aliased
// {*a, *c, b, d} are aliased
int main () {
......
// triple pointer assignment with some tricky alias
// { *b; *d } are aliased
// { b; d; *a; *c } are aliased
// {*a, b} are aliased
// {*(*a), *b, c, d} are aliased
int main () {
......
// homogeneous cast
// { a; c; } are aliased
// { *a; *c; } are aliased
// { b; d; } are aliased
// { *b; *d; } are aliased
// {a, c} are aliased
// {b, d} are aliased
int main () {
......
// conditional cfg
// { a; b; c } are aliased
// { *a; *b; *c } are aliased
// {a, b, c} are aliased
int main () {
......
// conditional cfg
// {d; *c; } are aliased
// {a; b; } are aliased
// {c; *a; *b; } are aliased
// {*a, *b, c} are aliased
// {*(*a), *(*b), *c, d} are aliased
// {a, b} are aliased
int main () {
......
// function with no return
// { a; b } are aliased
// { *a; *b } are aliased
// { c; d } are aliased
// { *c; *d } are aliased
// {a, b} are aliased
// {c, d} are aliased
void swap(int *x, int* y) {
......@@ -13,8 +11,6 @@ void swap(int *x, int* y) {
}
int main(void)
{
int *a=0, *b=0, *c=0, *d=0;
......
// function with a loop inside
// { a; b } are aliased
// { *a; *b } are aliased
// { c; d } are aliased
// { *c; *d } are aliased
// {a, b} are aliased
// {c, d} are aliased
void *f1(int *x, int* y)
{
......
// funxtion with address agument
// { a; b } are aliased
// { *a; *b } are aliased
// {a, b} are aliased
int * addr(int* x)
{
......
// function with multiple returns
// { a; b; c } are aliased
// { *a; *b; *c } are aliased
// {a, b, c} are aliased
int * choice(int* x, int* y)
......
// another test for conditional
// {*b, *c, a, y} are aliased
// {b, c} are aliased
int main () {
int *a, **b, **c, *y, x, z, p;
a = &x;
......
// control structure and arrays
// { a; b; d } are aliased
// { *a; *b; *d } are aliased
// switch
// {a, b, d} are aliased
int main ()
{
......
// control structure and arrays
// { a; b; c; d } are aliased
// { *a; *b; *c; *d } are aliased
// switch with default
// {a, b, c, d} are aliased
int main ()
{
......
// while loops with trivial conditions
// { a; b } are aliased
// { *a; *b } are aliased
// {a, b} are aliased
int main ()
{
......
// continue
// { a; b } are aliased
// { *a; *b } are aliased
// {a, b} are aliased
int main ()
{
......
// simple array
// {x, y} are aliased
int main () {
int tab[4];
......
// matrices
// no alias
int main () {
int mat[4][4];
......
// nested structures and arrays
// {z1->s, z2->s, tab_y[0]} are aliased
// {t->t, z1} are aliased
// {z1->c, t->d, a} are aliased
// {z2->c, b} are aliased
#include <stdlib.h>
typedef struct
......@@ -21,8 +28,6 @@ typedef struct
int main () {
st_1_t x1 = {0,1};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment