This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix PR/45292, miscompilation of sync_bool_compare_and_swap due to deferred pop
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 17 Aug 2010 00:35:53 +0200
- Subject: fix PR/45292, miscompilation of sync_bool_compare_and_swap due to deferred pop
This fixes a bug in expansion of sync_bool_compare_and_swap, where we
were relying on the CC value from the sync_compare_and_swap optab but
clobbering it before reading it. This is due to a
do_pending_stack_adjust in emit_store_flag_1. Fixed by doing the stack
adjust before everything else.
This is a regression from 4.4. The testcase is libgomp;
bootstrapped/regtested x86_64-pc-linux-gnu, checked the problematic file
using -march=i486 -mtune=i586. Ok for 4.5 and trunk?
Paolo
Attachment:
pr45292.patch
Description: Text document