aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040313-1.c
blob: 0ad144c03dd4517e38b53c9ba488ba3fa9586dac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O3" } */

/* Test provided by Volker Reichelt in PR 14553.  The redundant PHI
   node elimination pass was not using the right API functions to
   propagate pointers, which resulted in dereferenced pointers that
   did not have memory tags associated with them.  */

void foo(int* p)
{
    int i;
    for (i=1; i>0; --i, ++p)
        *p=0;
}

void bar(int* p) { foo(p); }