public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/37606] New: builtins.c: 6 * set but not used
@ 2008-09-21 10:17 dcb314 at hotmail dot com
2008-09-21 12:23 ` [Bug bootstrap/37606] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 3+ messages in thread
From: dcb314 at hotmail dot com @ 2008-09-21 10:17 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <bug-37606-4@http.gcc.gnu.org/bugzilla/>]
* [Bug bootstrap/37606] builtins.c: 6 * set but not used
[not found] <bug-37606-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-28 5:09 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-28 5:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37606
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-28 04:42:34 UTC ---
Fixed by:
2009-11-07 David Binderman <dcb314@hotmail.com>
* builtins.c (apply_args_size, expand_builtin_mathfn, expand_powi,
expand_builtin_expect, maybe_emit_sprintf_chk_warning): Remove some
set but not used variables.
(apply_args_reg_offset): Comment out as unused.
* calls.c (flags_from_decl_or_type): Likewise.
* genautomata.c (check_regexp_units_distribution): Likewise.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-28 4:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-21 10:17 [Bug bootstrap/37606] New: builtins.c: 6 * set but not used dcb314 at hotmail dot com
2008-09-21 12:23 ` [Bug bootstrap/37606] " rguenth at gcc dot gnu dot org
[not found] <bug-37606-4@http.gcc.gnu.org/bugzilla/>
2012-01-28 5:09 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).