view gcc/testsuite/gcc.dg/torture/pr78546-1.c @ 145:1830386684a0

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

/* PR rtl-optimization/78546 */
/* { dg-do run { target int128 } } */

typedef unsigned __int128 u128;
u128 b;

static inline u128
foo (u128 p1)
{
  p1 += ~b;
  return -p1;
}

int
main ()
{
  asm volatile ("" : : : "memory");
  u128 x = foo (~0x7fffffffffffffffLL);
  if (x != 0x8000000000000001ULL)
    __builtin_abort ();
  return 0;
}