This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/37606] New: builtins.c: 6 * set but not used


Hello there,


I just tried to bootstrap the most recent snapshot of gcc version
4.4, dated 20080919, with the Intel C compiler.

The Intel compiler said

../../src/gcc-4.4-20080919/gcc/builtins.c(1856): warning #593: variable
"before_call" was set but never used
../../src/gcc-4.4-20080919/gcc/builtins.c(2856): warning #593: variable "val"
was set but never used
../../src/gcc-4.4-20080919/gcc/builtins.c(5201): warning #593: variable "c" was
set but never used
../../src/gcc-4.4-20080919/gcc/builtins.c(11943): warning #593: variable "dest"
was set but never used
../../src/gcc-4.4-20080919/gcc/builtins.c(11943): warning #593: variable "flag"
was set but never used
../../src/gcc-4.4-20080919/gcc/builtins.c(1201): warning #593: variable
"apply_args_reg_offset" was set but never used

Here is a patch to shut up the compiler


--- gcc/builtins.c.sav  2008-09-21 09:28:51.000000000 +0100
+++ gcc/builtins.c      2008-09-21 09:32:03.000000000 +0100
@@ -1194,12 +1194,6 @@
    INCOMING_REGNO gives the corresponding inbound register.  */
 static enum machine_mode apply_result_mode[FIRST_PSEUDO_REGISTER];

-/* For each register that may be used for calling a function, this
-   gives the offset of that register into the block returned by
-   __builtin_apply_args.  0 indicates that the register is not
-   used for calling a function.  */
-static int apply_args_reg_offset[FIRST_PSEUDO_REGISTER];
-
 /* Return the size required for the block returned by __builtin_apply_args,
    and initialize apply_args_mode.  */

@@ -1232,14 +1226,12 @@
            align = GET_MODE_ALIGNMENT (mode) / BITS_PER_UNIT;
            if (size % align != 0)
              size = CEIL (size, align) * align;
-           apply_args_reg_offset[regno] = size;
            size += GET_MODE_SIZE (mode);
            apply_args_mode[regno] = mode;
          }
        else
          {
            apply_args_mode[regno] = VOIDmode;
-           apply_args_reg_offset[regno] = 0;
          }
     }
   return size;
@@ -1853,7 +1845,7 @@
 expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
 {
   optab builtin_optab;
-  rtx op0, insns, before_call;
+  rtx op0, insns;
   tree fndecl = get_callee_fndecl (exp);
   enum machine_mode mode;
   bool errno_set = false;
@@ -1958,7 +1950,7 @@
       end_sequence ();
     }

-  before_call = get_last_insn ();
+  get_last_insn ();

   return expand_call (exp, target, target == const0_rtx);
 }
@@ -2853,15 +2845,12 @@
 static rtx
 expand_powi (rtx x, enum machine_mode mode, HOST_WIDE_INT n)
 {
-  unsigned HOST_WIDE_INT val;
   rtx cache[POWI_TABLE_SIZE];
   rtx result;

   if (n == 0)
     return CONST1_RTX (mode);

-  val = (n < 0) ? -n : n;
-
   memset (cache, 0, sizeof (cache));
   cache[1] = x;

@@ -5198,12 +5187,11 @@
 static rtx
 expand_builtin_expect (tree exp, rtx target)
 {
-  tree arg, c;
+  tree arg;

   if (call_expr_nargs (exp) < 2)
     return const0_rtx;
   arg = CALL_EXPR_ARG (exp, 0);
-  c = CALL_EXPR_ARG (exp, 1);

   target = expand_expr (arg, target, VOIDmode, EXPAND_NORMAL);
   /* When guessing was done, the hints should be already stripped away.  */
@@ -11940,7 +11928,7 @@
 static void
 maybe_emit_sprintf_chk_warning (tree exp, enum built_in_function fcode)
 {
-  tree dest, size, len, fmt, flag;
+  tree size, len, fmt;
   const char *fmt_str;
   int nargs = call_expr_nargs (exp);

@@ -11948,8 +11936,6 @@

   if (nargs < 4)
     return;
-  dest = CALL_EXPR_ARG (exp, 0);
-  flag = CALL_EXPR_ARG (exp, 1);
   size = CALL_EXPR_ARG (exp, 2);
   fmt = CALL_EXPR_ARG (exp, 3);


-- 
           Summary: builtins.c: 6 * set but not used
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: suse-linux-x86_64


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37606


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]