aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/delayedfold/unary-plus1.C
blob: ebf34934b7260fb0ef6544b9e59ac2fcf1a5b76c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR c++/70153
// { dg-do run }

unsigned long long int
fn1 (unsigned long long int i)
{
  return 2ULL * ((1 + (unsigned long int) +1) * i);
}

unsigned long long int
fn2 (unsigned long long int i)
{
  return 2ULL * ((1 + (unsigned long int) +(1 + 0)) * i);
}

int
main (void)
{
  if (fn1 (3ULL) != 12ULL
      || fn2 (3ULL) != 12ULL)
    __builtin_abort ();
}