Fix -O0 core dump reported by Fred Fish.
authorJim Wilson <wilson@cygnus.com>
Wed, 11 Aug 1999 00:26:38 +0000 (00:26 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 11 Aug 1999 00:26:38 +0000 (17:26 -0700)
* config/sh/sh.c (machine_dependent_reorg): Only call PUT_MODE on
note if it is non-NULL.

From-SVN: r28653

gcc/ChangeLog
gcc/config/sh/sh.c

index 040946176038e922b58b2bbbf0b692cda04b7df6..1e9249b875e032a721fb21326044fd3384157dcd 100644 (file)
@@ -1,3 +1,8 @@
+Tue Aug 10 17:19:02 1999  Jim Wilson  <wilson@cygnus.com>
+
+       * config/sh/sh.c (machine_dependent_reorg): Only call PUT_MODE on
+       note if it is non-NULL.
+
 Tue Aug 10 10:47:42 EDT 1999  Andrew MacLeod  <amacleod@cygnus.com>
 
        * except.h (eh_nesting_info): Add new structure defintion.
index b6799d95ff1e3180edfd86c6776856f223a2dc47..dd3db9675aab2b53b73cc2e9835cf5658a9aa50d 100644 (file)
@@ -3123,7 +3123,10 @@ machine_dependent_reorg (first)
                          rtx note
                            = find_regno_note (last_float_move, REG_UNUSED, 0);
 
-                         PUT_MODE (note, REG_INC);
+                         /* If we are not optimizing, then there may not be
+                            a note.  */
+                         if (note)
+                           PUT_MODE (note, REG_INC);
 
                          *last_float_addr = r0_inc_rtx;
                        }