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, testsuite] Fix for PR49519, miscompiled 447.dealII in SPEC CPU 2006


> ChangeLog entry:
> 2011-07-06  Kirill Yukhin  <kirill.yukhin@intel.com>
>
>        PR middle-end/49519
>        * calls.c (mem_overlaps_already_clobbered_arg_p): Additional
>        check if address is stored in register. If so - give up.
>        (check_sibcall_argument_overlap_1): Do not perform check of
>        overlapping when it is call to address.
>
> tessuite/ChangeLog entry:
> 2011-07-06  Kirill Yukhin  <kirill.yukhin@intel.com>
>
>        * g++.dg/torture/pr49519.C: New test for tailcall fix.

New test is sufficient.

> Bootstrapped, new test fails without patch, passes when it is applied.
> This fixes the problem with SPEC2006/447.dealII miscompile

OK, modulo a few nits:

+  /* If address come in register - we have no idea of its origin, so
+     give up and conservatively return true */
+  else if (GET_CODE (addr) == REG)

/* If the address comes in a register, we have no idea of its origin so
   give up and conservatively return true.  */

Note the period-double-space-star-slash GNUism at the end.  Non-negotiable.


+  /* We do not check arguments of call expression */
+  if (code == CALL)
+    return 0;

Nice ambiguity, the entire machinery is about checking arguments of calls. :-)

/* We need not check the operands of the CALL expresion itself.  */


No need to retest, just make sure the changes compile (e.g. type 'make' from 
within the gcc/ directory of a bootstrap tree) and commit.

Thanks for fixing the bug.

-- 
Eric Botcazou


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