summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr49235.c
blob: f1e589f75580c2156d4421f1545ae45bcd11fdba (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
/* PR rtl-optimization/49235 */
/* { dg-do compile { target { int32plus } } } */
/* { dg-options "-O -fno-delete-null-pointer-checks -fno-tree-scev-cprop -ftree-vectorize -fno-vect-cost-model -w" } */

void
foo (void)
{
  unsigned i;
  unsigned *p = 0;
  for (i = 0; i < 4; ++i)
    *p++ = 0;
  for (i = 0; i < 4; ++i)
    *p++ = 0;
}

void
bar (void)
{
  unsigned i;
  unsigned *p = (unsigned *) (__UINTPTR_TYPE__) 0x12340000;
  for (i = 0; i < 4; ++i)
    *p++ = 0;
  for (i = 0; i < 4; ++i)
    *p++ = 0;
}