summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr45107.c
blob: 05dbec32177a14968cb25adae81b2d6b2d8fb085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* PR rtl-optimization/45107 */
/* { dg-do compile } */
/* { dg-options "-Os -fgcse-las" } */

extern void bar(int *);

int foo (int *p)
{
    int i = *p;
    if (i != 1)
      bar(&i);
    *p = i;
}