c-lex.c (yylex): Initialize traditional_type, ansi_type and type.
authorJeffrey A Law <law@cygnus.com>
Wed, 1 Apr 1998 23:18:11 +0000 (23:18 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 1 Apr 1998 23:18:11 +0000 (16:18 -0700)
        * c-lex.c (yylex): Initialize traditional_type, ansi_type and type.
        * caller-save.c (insert_save_restore): Initialize pat, code and
        numregs.
        * emit-rtl.c (push_to_sequence): Initialize top.
        (push_topmost_sequence): Likewise.
        * genattrtab.c (simplify_by_exploding): Initialize defval.
        * profile.c (branch_prob): Initialize dest.
        * rtl.h (note_stores): Remove duplicate prototype.
        (GEN_INT): Re-instate cast of second arg to HOST_WIDE_INT.
Fix some warnings.
        * cplus-dem.c (gnu_special): Don't get confused by .<digits>
        strings that are not actually lengths.
A change from libiberty that didn't make it into the gcc copy.

From-SVN: r18942

gcc/ChangeLog
gcc/c-lex.c
gcc/caller-save.c
gcc/cplus-dem.c
gcc/emit-rtl.c
gcc/genattrtab.c
gcc/profile.c
gcc/rtl.h

index 59ab3fd620000719d68aa71ee2bd076a0af7fcfa..16484890726f3756fe2debf4fee42cec2fb06b66 100644 (file)
@@ -1,5 +1,23 @@
 Wed Apr  1 22:26:22 1998  Jeffrey A Law  (law@cygnus.com)
 
+       * c-lex.c (yylex): Initialize traditional_type, ansi_type and type.
+
+       * caller-save.c (insert_save_restore): Initialize pat, code and
+       numregs.
+
+       * emit-rtl.c (push_to_sequence): Initialize top.
+       (push_topmost_sequence): Likewise.
+
+       * genattrtab.c (simplify_by_exploding): Initialize defval.
+
+       * profile.c (branch_prob): Initialize dest.
+
+       * rtl.h (note_stores): Remove duplicate prototype.
+       (GEN_INT): Re-instate cast of second arg to HOST_WIDE_INT.
+
+       * cplus-dem.c (gnu_special): Don't get confused by .<digits>
+       strings that are not actually lengths.
+
        * genattrtab.c: Make generated file use system.h, instead of
        including stdio.h, etc directly.
        * genextract.c, genopinit.c, genoutput.c: Likewise.
index d32f7a833b194133d965e984ce7b1b36a7fd955a..a9863aaf2fd8e42af22d83c5cf6a8fd7a9e189ae 100644 (file)
@@ -1674,6 +1674,7 @@ yylex ()
            int spec_imag = 0;
            int bytes, warn, i;
 
+           traditional_type = ansi_type = type = NULL_TREE;
            while (1)
              {
                if (c == 'u' || c == 'U')
index 57dfbb8c91ef11854fb4fabf385f736a33a9c9ef..c808ecaeeeab16a25294fd1ccf22691a2772e53b 100644 (file)
@@ -640,9 +640,9 @@ insert_save_restore (insn, save_p, regno, insn_mode, maxrestore)
      enum machine_mode insn_mode;
      int maxrestore;
 {
-  rtx pat;
-  enum insn_code code;
-  int numregs;
+  rtx pat = NULL_RTX;
+  enum insn_code code = CODE_FOR_nothing;
+  int numregs = 0;
 
   /* A common failure mode if register status is not correct in the RTL
      is for this routine to be called with a REGNO we didn't expect to
index 898ab4bd500c490534a6042e8fde1990e3fa7ef5..acdbfa897e2e090aaf3250456aecbdb2ae4a6f2e 100644 (file)
@@ -1901,6 +1901,15 @@ gnu_special (work, mangled, declp)
              if (isdigit(*mangled[0]))
                {
                  n = consume_count(mangled);
+                 /* We may be seeing a too-large size, or else a
+                    ".<digits>" indicating a static local symbol.  In
+                    any case, declare victory and move on; *don't* try
+                    to use n to allocate.  */
+                 if (n >= strlen (*mangled))
+                   {
+                     success = 1;
+                     break;
+                   }
                }
              else
                {
index e6c07aae1f2562047e00c4a9f497fbdd54c00d71..54af3b8bc5b0783650db5c63e20177a916190d1e 100644 (file)
@@ -3112,7 +3112,7 @@ push_to_sequence (first)
 void
 push_topmost_sequence ()
 {
-  struct sequence_stack *stack, *top;
+  struct sequence_stack *stack, *top = NULL;
 
   start_sequence ();
 
@@ -3130,7 +3130,7 @@ push_topmost_sequence ()
 void
 pop_topmost_sequence ()
 {
-  struct sequence_stack *stack, *top;
+  struct sequence_stack *stack, *top = NULL;
 
   for (stack = sequence_stack; stack; stack = stack->next)
     top = stack;
index 040521b006dd59f32b7b837cca15dfaa16777107..0ddd2a8a14116ae96a370af7ac521d2d2e483f3a 100644 (file)
@@ -3561,7 +3561,7 @@ static rtx
 simplify_by_exploding (exp)
      rtx exp;
 {
-  rtx list = 0, link, condexp, defval;
+  rtx list = 0, link, condexp, defval = NULL_RTX;
   struct dimension *space;
   rtx *condtest, *condval;
   int i, j, total, ndim = 0;
index 7ce327b076169fa95593f2fb59ae5b84079b10c6..bedeeaea02d85c996d5bfdbfe0d909c6f030ce92 100644 (file)
@@ -618,7 +618,7 @@ branch_prob (f, dump_file)
     register int i;
     int fall_through = 0;
     struct adj_list *arcptr;
-    int dest;
+    int dest = NULL_RTX;
 
     /* Block 0 always falls through to block 1.  */
     num_arcs = 0;
index c78b9478258abd864c69842c6555f7071729f950..f31d10de7a166775492ac0691275b0a39a9b5479 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -856,7 +856,6 @@ extern rtx single_set                       PROTO((rtx));
 extern rtx find_last_value             PROTO((rtx, rtx *, rtx));
 extern int refers_to_regno_p           PROTO((int, int, rtx, rtx *));
 extern int reg_overlap_mentioned_p     PROTO((rtx, rtx));
-extern void note_stores                        PROTO((rtx, void (*)()));
 extern rtx reg_set_last                        PROTO((rtx, rtx));
 extern int rtx_equal_p                 PROTO((rtx, rtx));
 extern int dead_or_set_p               PROTO((rtx, rtx));
@@ -951,7 +950,9 @@ extern rtx static_chain_incoming_rtx;
 extern rtx gen_rtx_CONST_INT PROTO((enum machine_mode, HOST_WIDE_INT));
 extern rtx gen_rtx_REG PROTO((enum machine_mode, int));
 
-#define GEN_INT(N)  gen_rtx_CONST_INT (VOIDmode, (N))
+/* We need the cast here to ensure that we get the same result both with
+   and without prototypes.  */
+#define GEN_INT(N)  gen_rtx_CONST_INT (VOIDmode, (HOST_WIDE_INT) (N))
 
 
 /* If HARD_FRAME_POINTER_REGNUM is defined, then a special dummy reg