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]

Re: Small update to reversed_comparison_code


> > I'd like to see an example of failure on the release branch before
> > we touch that code at all.
> This testcase produces crash for me:
> 
> int x;
> float a,b,e;
> test()
> {
>   if (__builtin_isgreater (a,b))
> 	  a=a+b;
>   q();
> }
> 
> Sorry for taking so long time...
Maybe better testcase is:

int x;
float a,b,e;
test()
{
  if (a<b)
	  a=a+b;
  else
	  b=b+e;
  q();
}

That gets predicated by lt and ge tests, so the unordered case won't get
executed eighter of the assignments.

Honza
> 
> Honza


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