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: [lno] optimizing return statements


Andrew Pinski <pinskia@physics.uc.edu> writes:

> This implements the following transformation so that other optimizer
> can happen:
>    if (a)
>      return b;
>    else
>      return c;
> into
>    if (a)
>      T = b;
>    else
>      T = c;
>    return T;

This breaks bootstrapping on Alpha when creating __cmpti2. Test case:

% cat >! test.i && ./xgcc -B. -c -O test.i

int cmpti2 (int au)
{
  if (au)
    return 1;
  return 0;
}

test.i: In function `cmpti2':
test.i:2: internal compiler error: in tree_redirect_edge_and_branch, at tree-cfg.c:3742
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
	Falk


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