aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr68668.c
blob: d013aa92cef996bbd9ba7503cd8f5ffd766d5bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* PR c/68668 */
/* { dg-do compile } */

typedef const int T[];
typedef const int U[1];

int
fn1 (T p)
{
  return p[0];
}

int
fn2 (U p[2])
{
  return p[0][0];
}

int
fn3 (U p[2][3])
{
  return p[0][0][0];
}

int
fn4 (U *p)
{
  return p[0][0];
}

int
fn5 (U (*p)[1])
{
  return (*p)[0][0];
}

int
fn6 (U (*p)[1][2])
{
  return (*p)[0][0][0];
}

int
fn7 (U **p)
{
  return p[0][0][0];
}

int
fn8 (U (**p)[1])
{
  return (*p)[0][0][0];
}