summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/static4.C
blob: 87e11b027563a2223a7655f00d5aae97c0119e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR 13898
// Make sure the two X variables get assigned unique assembler names
// if they are promoted to static storage.

// { dg-do compile }

int g(int i) { 
  if (i<1) { 
    const int x[3] = { 1,2,3 }; 
    return x[i]; 
  } else { 
    const int x[3] = { 4,5,6 }; 
    return x[i]; 
  } 
}