view gcc/testsuite/gcc.dg/pr84309.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* 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;
}