From: Richard Stallman Date: Mon, 12 Oct 1992 08:23:25 +0000 (+0000) Subject: (output_addr_const): Call simplify_subtraction. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f1fd3b1f4fab5806976d2ea98c0176840061c50;p=gcc.git (output_addr_const): Call simplify_subtraction. From-SVN: r2403 --- diff --git a/gcc/final.c b/gcc/final.c index d82d5534709..49df7b0e318 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2278,6 +2278,12 @@ output_addr_const (file, x) break; case MINUS: + /* Avoid outputting things like x-x or x+5-x, + since some assemblers can't handle that. */ + x = simplify_subtraction (x); + if (GET_CODE (x) != MINUS) + goto restart; + output_addr_const (file, XEXP (x, 0)); fprintf (file, "-"); if (GET_CODE (XEXP (x, 1)) == CONST_INT