Patchwork RFT: Fix PR middle/end-40154

login
register
mail settings
Submitter Kaz Kojima
Date Nov. 8, 2011, 2:12 p.m.
Message ID <20111108.231211.353111095.kkojima@rr.iij4u.or.jp>
Download mbox | patch
Permalink /patch/124370/
State New
Headers show

Comments

Kaz Kojima - Nov. 8, 2011, 2:12 p.m.
Joern Rennecke <joern.rennecke@embecosm.com> wrote:
> That's true, and it is by design.
> This use of set_unique_reg_note is a bit debatable - add_reg_note
> should do just fine there.
> 
> OTOH keeping this as it is, and keeping set_unique_reg_note accepting USE
> in this case, seems more conservative for stage3.

A tiny change was needed


I'm regtesting the patch on SH, though currently many C++ tests fail
on SH with

undefined reference to `std::atomic_thread_fence(std::memory_order)'.

Regards,
	kaz
Kaz Kojima - Nov. 9, 2011, 1:57 p.m.
> I'm regtesting the patch on SH, though currently many C++ tests fail
> on SH with
> 
> undefined reference to `std::atomic_thread_fence(std::memory_order)'.

There are no new failures with the patch + reverting
148018 workaround on sh4-unknown-linux-gnu.

Regards,
	kaz

Patch

--- trunk/gcc/emit-rtl.c.orig	2011-11-08 22:46:20.000000000 +0900
+++ trunk/gcc/emit-rtl.c	2011-11-08 22:53:16.000000000 +0900
@@ -4974,7 +4974,7 @@  set_unique_reg_note (rtx insn, enum reg_
     }
   else /* Reload uses USEs with REG_EQUAL notes attached to keep track of
 	  reload inhertiance opportunities.  */
-    gcc_assert (PATTERN (insn) == USE && reload_in_progress);
+    gcc_assert (GET_CODE (PATTERN (insn)) == USE && reload_in_progress);
   note = find_reg_note (insn, kind, NULL_RTX);
 
   switch (kind)