spu.c (pad_bb): Do not crash when the last insn is CODE_FOR_blockage.
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 2 Apr 2014 18:54:01 +0000 (18:54 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Wed, 2 Apr 2014 18:54:01 +0000 (18:54 +0000)
* config/spu/spu.c (pad_bb): Do not crash when the last
insn is CODE_FOR_blockage.

From-SVN: r209029

gcc/ChangeLog
gcc/config/spu/spu.c

index d6d4072..510f398 100644 (file)
@@ -1,5 +1,10 @@
 2014-04-02  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
+       * config/spu/spu.c (pad_bb): Do not crash when the last
+       insn is CODE_FOR_blockage.
+
+2014-04-02  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
        * config/spu/spu.md ("insv"): Fail if bitoffset+bitsize
        lies outside the target mode.
 
index 302d7e0..88e3f5e 100644 (file)
@@ -2064,7 +2064,7 @@ pad_bb(void)
            }
          hbr_insn = insn;
        }
-      if (INSN_CODE (insn) == CODE_FOR_blockage)
+      if (INSN_CODE (insn) == CODE_FOR_blockage && next_insn)
        {
          if (GET_MODE (insn) == TImode)
            PUT_MODE (next_insn, TImode);