From: John David Anglin Date: Thu, 15 Jan 2004 14:58:06 +0000 (+0000) Subject: re PR rtl-optimization/12372 (miscompilation of execute/20030307-1.c at -O2 and -Os) X-Git-Tag: releases/gcc-3.4.0~944 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fabc3d68e20fdc8b9298ec387d3b36b56b2568e;p=thirdparty%2Fgcc.git re PR rtl-optimization/12372 (miscompilation of execute/20030307-1.c at -O2 and -Os) PR optimization/12372 * calls.c (expand_call): Add call_fusage data for stack arguments in constant calls. From-SVN: r75926 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 51b568c36818..5ae14569f41e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-01-15 John David Anglin + + PR optimization/12372 + * calls.c (expand_call): Add call_fusage data for stack arguments in + constant calls. + 2004-01-15 Alan Modra * config/rs6000/rs6000.c (uses_TOC): Correct comment. Make static. diff --git a/gcc/calls.c b/gcc/calls.c index 1be581cfa692..f0a59bbf6179 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -3025,6 +3025,14 @@ expand_call (tree exp, rtx target, int ignore) && check_sibcall_argument_overlap (before_arg, &args[i], 1))) sibcall_failure = 1; + + if (flags & ECF_CONST + && args[i].stack + && args[i].value == args[i].stack) + call_fusage = gen_rtx_EXPR_LIST (VOIDmode, + gen_rtx_USE (VOIDmode, + args[i].value), + call_fusage); } /* If we have a parm that is passed in registers but not in memory