I want to check if the values a and b in the program alias.<br><br>int main() { <br>int *a,*b; <br>a=(int *)malloc(sizeof(int));<br>b=(int *)malloc(sizeof(int));<br>*a=10;<br>*b=8;<br>return 0;<br> }<br><br>I use the below code for this (getAnalysisUsage method has been defined)<br>
<br>AliasAnalysis::Location loc1=AliasAnalysis::Location(k1);  //a<br>AliasAnalysis::Location loc2=AliasAnalysis::Location(k2);  //b<br>AliasAnalysis::AliasResult ar=AA.alias(loc1,loc2);<br><br>But I get ar=1 i.e May Alias result. Where am I going wrong? I have included -basicaa option in the opt command for running this.