aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/dump-5.c
blob: 6807b5e9ef4fdee5e1e3423e808481981a174209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR middle-end/90694 - incorrect representation of ADDR_EXPR involving
   a pointer to array
   { dg-do compile }
   { dg-options "-fdump-tree-original" } */

typedef char A8[8];

unsigned f (A8 *pa)
{
  return __builtin_strlen (&(*pa)[2]);
}

/* Veriy the expression is correct in the dump:
  { dg-final { scan-tree-dump-not "\\\&\\\*pa\\\[2\\\]" "original" } }
  { dg-final { scan-tree-dump "\\\&\\\(\\\*pa\\\)\\\[2\\\]" "original" } } */