public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [AArch64] Fix some warnings about unused variables.
@ 2012-12-18 14:02 James Greenhalgh
  2012-12-18 16:36 ` Richard Earnshaw
  0 siblings, 1 reply; 3+ messages in thread
From: James Greenhalgh @ 2012-12-18 14:02 UTC (permalink / raw)
  To: gcc-patches; +Cc: marcus.shawcroft

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

Hi,

This straightforward patch fixes the following warnings I see when building
for AArch64.

gcc/config/aarch64/aarch64.c:6385:7: warning: unused variable ‘reg’ [-Wunused-variable]
gcc/config/aarch64/aarch64.c:6385:12: warning: unused variable ‘mem’ [-Wunused-variable]
gcc/config/aarch64/aarch64.c:6385:17: warning: unused variable ‘addr’ [-Wunused-variable]
gcc/config/aarch64/aarch64.c:6386:7: warning: unused variable ‘load’ [-Wunused-variable]
gcc/config/aarch64/aarch64.c:6669:17: warning: variable ‘mod_s’ set but not used [-Wunused-but-set-variable]

Regression tested on aarch64-none-elf with no regressions and checked
to ensure that the warnings go away.

OK to commit?

Thanks,
James Greenhalgh

---
gcc/

2012-12-18  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c (aarch64_simd_attr_length_move):
	Remove unused variables.
	(aarch64_split_compare_and_swap): Likewise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-AArch64-Fix-some-warnings-about-unused-variables.patch --]
[-- Type: text/x-patch;  name=0001-AArch64-Fix-some-warnings-about-unused-variables.patch, Size: 909 bytes --]

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 09b1777..03b1361 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6382,8 +6382,6 @@ aarch64_simd_disambiguate_copy (rtx *operands, rtx *dest,
 int
 aarch64_simd_attr_length_move (rtx insn)
 {
-  rtx reg, mem, addr;
-  int load;
   enum machine_mode mode;
 
   extract_insn_cached (insn);
@@ -6666,7 +6664,6 @@ aarch64_split_compare_and_swap (rtx operands[])
 {
   rtx rval, mem, oldval, newval, scratch;
   enum machine_mode mode;
-  enum memmodel mod_s;
   bool is_weak;
   rtx label1, label2, x, cond;
 
@@ -6675,7 +6672,6 @@ aarch64_split_compare_and_swap (rtx operands[])
   oldval = operands[2];
   newval = operands[3];
   is_weak = (operands[4] != const0_rtx);
-  mod_s = (enum memmodel) INTVAL (operands[5]);
   scratch = operands[7];
   mode = GET_MODE (mem);
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [AArch64] Fix some warnings about unused variables.
  2012-12-18 14:02 [AArch64] Fix some warnings about unused variables James Greenhalgh
@ 2012-12-18 16:36 ` Richard Earnshaw
  2013-01-02 16:25   ` James Greenhalgh
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Earnshaw @ 2012-12-18 16:36 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, Marcus Shawcroft

On 18/12/12 14:02, James Greenhalgh wrote:
> Hi,
>
> This straightforward patch fixes the following warnings I see when building
> for AArch64.
>
> gcc/config/aarch64/aarch64.c:6385:7: warning: unused variable ‘reg’ [-Wunused-variable]
> gcc/config/aarch64/aarch64.c:6385:12: warning: unused variable ‘mem’ [-Wunused-variable]
> gcc/config/aarch64/aarch64.c:6385:17: warning: unused variable ‘addr’ [-Wunused-variable]
> gcc/config/aarch64/aarch64.c:6386:7: warning: unused variable ‘load’ [-Wunused-variable]
> gcc/config/aarch64/aarch64.c:6669:17: warning: variable ‘mod_s’ set but not used [-Wunused-but-set-variable]
>
> Regression tested on aarch64-none-elf with no regressions and checked
> to ensure that the warnings go away.
>
> OK to commit?
>

OK.

R.

> Thanks,
> James Greenhalgh
>
> ---
> gcc/
>
> 2012-12-18  James Greenhalgh  <james.greenhalgh@arm.com>
>
> 	* config/aarch64/aarch64.c (aarch64_simd_attr_length_move):
> 	Remove unused variables.
> 	(aarch64_split_compare_and_swap): Likewise.
>
>
> 0001-AArch64-Fix-some-warnings-about-unused-variables.patch
>
>
> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
> index 09b1777..03b1361 100644
> --- a/gcc/config/aarch64/aarch64.c
> +++ b/gcc/config/aarch64/aarch64.c
> @@ -6382,8 +6382,6 @@ aarch64_simd_disambiguate_copy (rtx *operands, rtx *dest,
>   int
>   aarch64_simd_attr_length_move (rtx insn)
>   {
> -  rtx reg, mem, addr;
> -  int load;
>     enum machine_mode mode;
>
>     extract_insn_cached (insn);
> @@ -6666,7 +6664,6 @@ aarch64_split_compare_and_swap (rtx operands[])
>   {
>     rtx rval, mem, oldval, newval, scratch;
>     enum machine_mode mode;
> -  enum memmodel mod_s;
>     bool is_weak;
>     rtx label1, label2, x, cond;
>
> @@ -6675,7 +6672,6 @@ aarch64_split_compare_and_swap (rtx operands[])
>     oldval = operands[2];
>     newval = operands[3];
>     is_weak = (operands[4] != const0_rtx);
> -  mod_s = (enum memmodel) INTVAL (operands[5]);
>     scratch = operands[7];
>     mode = GET_MODE (mem);
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [AArch64] Fix some warnings about unused variables.
  2012-12-18 16:36 ` Richard Earnshaw
@ 2013-01-02 16:25   ` James Greenhalgh
  0 siblings, 0 replies; 3+ messages in thread
From: James Greenhalgh @ 2013-01-02 16:25 UTC (permalink / raw)
  To: gcc-patches

> OK.
> 
> R.

Thanks Richard,

I've also backported this to aarch64-4.7-branch and committed
it as revision 194808.

Cheers,
James Greenhalgh



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-02 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-18 14:02 [AArch64] Fix some warnings about unused variables James Greenhalgh
2012-12-18 16:36 ` Richard Earnshaw
2013-01-02 16:25   ` James Greenhalgh

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).