aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr84309.c
blob: 6fe774e57cfcb6e66f0aa66390e1307ad6c3f9d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR middle-end/84309 */
/* { dg-do run { target c99_runtime } } */
/* { dg-options "-O2 -ffast-math" } */

int
main ()
{
  unsigned long a = 1024;
  unsigned long b = 16 * 1024;
  unsigned long c = __builtin_pow (2, (__builtin_log2 (a) + __builtin_log2 (b)) / 2);
  if (c != 4096)
    __builtin_abort ();
  return 0;
}