summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/ia64/pr52731.c
blob: 50ef1d78d757dcde36c7a0b5a77385b46049ef12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile { target ia64-*-* } } */
/* { dg-options "-O2" } */

char* area;
long int area_size;
char* base;

void fun(unsigned long int addr)
{
  unsigned long int size32 = (addr + 4096 - 1) & ~(4096 - 1);
  unsigned long int size = size32 * sizeof(unsigned int);

  if (size > 0) {
    size = (size + 1) & ~(1);
  }

  area_size = size;
  area = base + size;
}