Skip to content

Two MAYALIAS in cs_tests/recur8.c should be NOALIAS? #26

@taquangtrung

Description

@taquangtrung

Hi,

For the two MAYALIAS in this test case, I think they should be NOALIAS?

This is because c and &b are aliases, and b, z1, z2 are variables declared differently, hence &b, &z1, &z2 cannot be aliases?

Could you advise if my understanding is correct?

// cs_tests/recur8.c

#include "aliascheck.h"
int z1,z2;
void foo(int **p);
void bar(int **a){
	int *c, b;
	*a = &b;
	c = *a;
	MUSTALIAS(c,&b);
	MAYALIAS(c,&z1);   // it should be no-alias if strong updates are enabled
	MAYALIAS(c,&z2);
	foo(a);
}


void foo(int** p){
	p = malloc(10);
	*p = &z2;
	bar(p);
}

int main(){
	int **x, *y;
	x = &y;
	y = &z1;
	foo(x);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions