Hi,

while looking at the handling of basic asm statements
I noticed two minor glitches, which I want to fix now.

Secondly there is a wrong check in shorten_branches in final.c

Here we check if GET_CODE (body) == ASM_INPUT, that is
never true, because GET_CODE (body) == SEQUENCE here.
The right object to check is PATTERN (inner_insn).


Boot-strapped and reg-tested on x86_64-pc-linux-gnu,
OK for trunk?


Thanks
Bernd.
2015-12-06  Bernd Edlinger  <bernd.edlin...@hotmail.de>

	* final.c (shorten_branches): Fix check for basic asm.

Index: gcc/final.c
===================================================================
--- gcc/final.c	(revision 231320)
+++ gcc/final.c	(working copy)
@@ -1157,7 +1157,7 @@ shorten_branches (rtx_insn *first)
 	      int inner_uid = INSN_UID (inner_insn);
 	      int inner_length;
 
-	      if (GET_CODE (body) == ASM_INPUT
+	      if (GET_CODE (PATTERN (inner_insn)) == ASM_INPUT
 		  || asm_noperands (PATTERN (inner_insn)) >= 0)
 		inner_length = (asm_insn_count (PATTERN (inner_insn))
 				* insn_default_length (inner_insn));

Reply via email to