This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ancient wrong-code with ?: (PR middle-end/81814)


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]