> Can you file a bugreport and include a testcase for gnat.dg so that
> we can reproduce?  Bonus points if you manage to create a C testcase
> of course ;)

How can I collect them exactly? ;-)

unsigned long foo (int x)
{
  return x > 0 ? (unsigned long) x : 0UL;
}

On x86-64/Linux with GCC 7.2.1, the t.c.003t.original dump contains:

;; Function foo (null)
;; enabled by -tree-original


{
  return (long unsigned int) MAX_EXPR <x, 0>;
}

With mainline, it contains:

;; Function foo (null)
;; enabled by -tree-original


{
  return x > 0 ? (long unsigned int) x : 0;
}

-- 
Eric Botcazou

Reply via email to