Bug 38288 - i386/i386.c: 7 * set but not used variables
Summary: i386/i386.c: 7 * set but not used variables
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.4.0
: P3 minor
Target Milestone: 4.5.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-27 13:22 UTC by David Binderman
Modified: 2009-09-18 15:20 UTC (History)
1 user (show)

See Also:
Host: suse-linux-x86_64
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
patch for bug report (2.35 KB, patch)
2008-11-28 13:55 UTC, David Binderman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2008-11-27 13:22:43 UTC
I just tried to build the GNU gcc version 4.4.0 snapshot 20081121
with the Intel C compiler, which said

../../src/gcc-4.4-20081121/gcc/config/i386/i386.c(4315): warning #593: variable "f" was set but never used
../../src/gcc-4.4-20081121/gcc/config/i386/i386.c(7479): warning #593: variable "total_size" was set but never used
../../src/gcc-4.4-20081121/gcc/config/i386/i386.c(8886): warning #593: variable "reason" was set but never used
../../src/gcc-4.4-20081121/gcc/config/i386/i386.c(8887): warning #593: variable "reason_rtx" was set but never used
../../src/gcc-4.4-20081121/gcc/config/i386/i386.c(13074): warning #593: variable "op1" was set but never used
../../src/gcc-4.4-20081121/gcc/config/i386/i386.c(13520): warning #593: variable "arithmetics_cost"was set but never used
../../src/gcc-4.4-20081121/gcc/config/i386/i386.c(16432): warning #593: variable "piece_size_mask" was set but never used

I checked the source code and I agree with the Intel compiler.
Suggest delete all seven set but not used variables.
Comment 1 David Binderman 2008-11-28 10:59:12 UTC
I've sent a patch to gcc-patches.

If the patch is accepted, then this report may
be closed.
Comment 2 Uroš Bizjak 2008-11-28 13:28:30 UTC
(In reply to comment #1)
> I've sent a patch to gcc-patches.

Can you paste the URL to the patch?
Comment 3 David Binderman 2008-11-28 13:55:44 UTC
Created attachment 16786 [details]
patch for bug report
Comment 4 Uroš Bizjak 2009-09-17 09:14:33 UTC
Is the patch from Comment #3 committed to SVN?
Comment 5 David Binderman 2009-09-17 20:35:34 UTC
(In reply to comment #4)
> Is the patch from Comment #3 committed to SVN?

I don't think so. I wouldn't know how to do that,
and I don't think anyone has done it for me.



Comment 6 uros 2009-09-18 15:13:15 UTC
Subject: Bug 38288

Author: uros
Date: Fri Sep 18 15:12:48 2009
New Revision: 151854

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151854
Log:
	PR target/38288
	From David Binderman <dcb314@hotmail.com>:
	* gcc/config/i386/i386.c (ix86_function_regparm): Remove useless
	local variable f.  Remove stale comments.
	(ix86_compute_frame_layout): Remove useless local variable total_size.
	Remove #if 0'd code.
	(legitimate_address_p): Remove useless local variables
	reason_rtx and reason.
	(ix86_split_copysign_const): Remove useless local variable op1.
	(scale_counter): Remove useless local variable piece_size_mask.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c

Comment 7 Uroš Bizjak 2009-09-18 15:20:19 UTC
Fixed.