aboutsummaryrefslogtreecommitdiff
path: root/rcc-legacy/tests/sysy_lvX/033_if4.sy
blob: 43ec90d20ee4efbd1af73ad3bf078b08fc61b99d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// test if-if-else
int ififElse() {
  int a;
  a = 5;
  int b;
  b = 10;
  if(a == 5)
    if (b == 10) 
      a = 25;
    else 
      a = a + 15;
    
  return a;
}

int main(){
  return ififElse();
}