public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* RFA: Fix target/44750
@ 2010-11-04 18:28 Joern Rennecke
  2010-11-04 20:43 ` Paul Koning
       [not found] ` <76BC23E8-E889-405A-9CBD-651F4D63A4B6@dell.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Joern Rennecke @ 2010-11-04 18:28 UTC (permalink / raw)
  To: gcc-patches; +Cc: ni1d

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

This patch fixes the remaining issues for the --enable-werror-always build
of pdp11.
tested by building 'all-gcc' for i686-pc-linux-gnu X pdp11-elf
using gcc (GCC) 4.6.0 20101103 (experimental).

[-- Attachment #2: pr44750-patch --]
[-- Type: text/plain, Size: 2975 bytes --]

2010-11-04  Joern Rennecke  <amylaar@spamcop.net>

	PR target/44750
	* config/pdp11/pdp11.c: (pdp11_secondary_reload): Now static.
	(pdp11_preferred_reload_class): Rename class to rclass.
	(pdp11_preferred_output_reload_class): Likewise.
	* config/pdp11/t-pdp11 (dwarf2out.o): Add -Wno-error=type-limits to
	ALL_COMPILERFLAGS .
	(java/constants.o): Add -Wno-error to ALL_COMPILERFLAGS.

Index: config/pdp11/pdp11.c
===================================================================
--- config/pdp11/pdp11.c	(revision 166313)
+++ config/pdp11/pdp11.c	(working copy)
@@ -1630,18 +1630,18 @@ pdp11_cannot_change_mode_class (enum mac
 loading is easier into LOAD_FPU_REGS than FPU_REGS! */
 
 static reg_class_t
-pdp11_preferred_reload_class (rtx x, reg_class_t class)
+pdp11_preferred_reload_class (rtx x, reg_class_t rclass)
 {
-  if (class == FPU_REGS)
+  if (rclass == FPU_REGS)
     return LOAD_FPU_REGS;
-  if (class == ALL_REGS)
+  if (rclass == ALL_REGS)
     {
       if (FLOAT_MODE_P (GET_MODE (x)))
 	return LOAD_FPU_REGS;
       else
 	return GENERAL_REGS;
     }
-  return class;
+  return rclass;
 }
 
 /* TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
@@ -1654,18 +1654,18 @@ pdp11_preferred_reload_class (rtx x, reg
 loading is easier into LOAD_FPU_REGS than FPU_REGS! */
 
 static reg_class_t
-pdp11_preferred_output_reload_class (rtx x, reg_class_t class)
+pdp11_preferred_output_reload_class (rtx x, reg_class_t rclass)
 {
-  if (class == FPU_REGS)
+  if (rclass == FPU_REGS)
     return LOAD_FPU_REGS;
-  if (class == ALL_REGS)
+  if (rclass == ALL_REGS)
     {
       if (FLOAT_MODE_P (GET_MODE (x)))
 	return LOAD_FPU_REGS;
       else
 	return GENERAL_REGS;
     }
-  return class;
+  return rclass;
 }
 
 
@@ -1674,7 +1674,7 @@ pdp11_preferred_output_reload_class (rtx
    FPU registers AC4 and AC5 (class NO_LOAD_FPU_REGS) require an 
    intermediate register (AC0-AC3: LOAD_FPU_REGS).  Everything else
    can be loade/stored directly.  */
-reg_class_t 
+static reg_class_t 
 pdp11_secondary_reload (bool in_p ATTRIBUTE_UNUSED,
 			rtx x,
 			reg_class_t reload_class,
Index: config/pdp11/t-pdp11
===================================================================
--- config/pdp11/t-pdp11	(revision 166313)
+++ config/pdp11/t-pdp11	(working copy)
@@ -34,3 +34,13 @@ dp-bit.c: $(srcdir)/config/fp-bit.c
 	cat $(srcdir)/config/fp-bit.c > dp-bit.c
 
 MULTILIB_OPTIONS = msoft-float
+
+# Because the pdp11 POINTER_SIZE is only 16, in dwarf2out.c,
+# DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
+# (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
+# comparison is always false.
+dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
+
+# Likewise, java/constants.c:build_constants_constructor has a negative shift
+# count (in never-executed code) due to the small POINTER_SIZE.
+java/constants.o: ALL_COMPILERFLAGS += -Wno-error

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

* Re: RFA: Fix target/44750
  2010-11-04 18:28 RFA: Fix target/44750 Joern Rennecke
@ 2010-11-04 20:43 ` Paul Koning
  2010-11-04 22:50   ` Paul Koning
       [not found] ` <76BC23E8-E889-405A-9CBD-651F4D63A4B6@dell.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Paul Koning @ 2010-11-04 20:43 UTC (permalink / raw)
  To: Joern Rennecke; +Cc: gcc-patches

Ok -- thanks!

	paul

On Nov 4, 2010, at 2:25 PM, Joern Rennecke wrote:

> This patch fixes the remaining issues for the --enable-werror-always build
> of pdp11.
> tested by building 'all-gcc' for i686-pc-linux-gnu X pdp11-elf
> using gcc (GCC) 4.6.0 20101103 (experimental).
> 2010-11-04  Joern Rennecke  <amylaar@spamcop.net>
> 
> 	PR target/44750
> 	* config/pdp11/pdp11.c: (pdp11_secondary_reload): Now static.
> 	(pdp11_preferred_reload_class): Rename class to rclass.
> 	(pdp11_preferred_output_reload_class): Likewise.
> 	* config/pdp11/t-pdp11 (dwarf2out.o): Add -Wno-error=type-limits to
> 	ALL_COMPILERFLAGS .
> 	(java/constants.o): Add -Wno-error to ALL_COMPILERFLAGS.
> 
> Index: config/pdp11/pdp11.c
> ===================================================================
> --- config/pdp11/pdp11.c	(revision 166313)
> +++ config/pdp11/pdp11.c	(working copy)
> @@ -1630,18 +1630,18 @@ pdp11_cannot_change_mode_class (enum mac
> loading is easier into LOAD_FPU_REGS than FPU_REGS! */
> 
> static reg_class_t
> -pdp11_preferred_reload_class (rtx x, reg_class_t class)
> +pdp11_preferred_reload_class (rtx x, reg_class_t rclass)
> {
> -  if (class == FPU_REGS)
> +  if (rclass == FPU_REGS)
>     return LOAD_FPU_REGS;
> -  if (class == ALL_REGS)
> +  if (rclass == ALL_REGS)
>     {
>       if (FLOAT_MODE_P (GET_MODE (x)))
> 	return LOAD_FPU_REGS;
>       else
> 	return GENERAL_REGS;
>     }
> -  return class;
> +  return rclass;
> }
> 
> /* TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
> @@ -1654,18 +1654,18 @@ pdp11_preferred_reload_class (rtx x, reg
> loading is easier into LOAD_FPU_REGS than FPU_REGS! */
> 
> static reg_class_t
> -pdp11_preferred_output_reload_class (rtx x, reg_class_t class)
> +pdp11_preferred_output_reload_class (rtx x, reg_class_t rclass)
> {
> -  if (class == FPU_REGS)
> +  if (rclass == FPU_REGS)
>     return LOAD_FPU_REGS;
> -  if (class == ALL_REGS)
> +  if (rclass == ALL_REGS)
>     {
>       if (FLOAT_MODE_P (GET_MODE (x)))
> 	return LOAD_FPU_REGS;
>       else
> 	return GENERAL_REGS;
>     }
> -  return class;
> +  return rclass;
> }
> 
> 
> @@ -1674,7 +1674,7 @@ pdp11_preferred_output_reload_class (rtx
>    FPU registers AC4 and AC5 (class NO_LOAD_FPU_REGS) require an 
>    intermediate register (AC0-AC3: LOAD_FPU_REGS).  Everything else
>    can be loade/stored directly.  */
> -reg_class_t 
> +static reg_class_t 
> pdp11_secondary_reload (bool in_p ATTRIBUTE_UNUSED,
> 			rtx x,
> 			reg_class_t reload_class,
> Index: config/pdp11/t-pdp11
> ===================================================================
> --- config/pdp11/t-pdp11	(revision 166313)
> +++ config/pdp11/t-pdp11	(working copy)
> @@ -34,3 +34,13 @@ dp-bit.c: $(srcdir)/config/fp-bit.c
> 	cat $(srcdir)/config/fp-bit.c > dp-bit.c
> 
> MULTILIB_OPTIONS = msoft-float
> +
> +# Because the pdp11 POINTER_SIZE is only 16, in dwarf2out.c,
> +# DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
> +# (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
> +# comparison is always false.
> +dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
> +
> +# Likewise, java/constants.c:build_constants_constructor has a negative shift
> +# count (in never-executed code) due to the small POINTER_SIZE.
> +java/constants.o: ALL_COMPILERFLAGS += -Wno-error

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

* Re: RFA: Fix target/44750
  2010-11-04 20:43 ` Paul Koning
@ 2010-11-04 22:50   ` Paul Koning
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Koning @ 2010-11-04 22:50 UTC (permalink / raw)
  To: Joern Rennecke, gcc-patches

My apologies, I misread the patch.  I can only approve the pdp11 part of this.

	paul

On Nov 4, 2010, at 4:34 PM, Paul Koning wrote:

> Ok -- thanks!
> 
> 	paul
> 
> On Nov 4, 2010, at 2:25 PM, Joern Rennecke wrote:
> 
>> This patch fixes the remaining issues for the --enable-werror-always build
>> of pdp11.
>> tested by building 'all-gcc' for i686-pc-linux-gnu X pdp11-elf
>> using gcc (GCC) 4.6.0 20101103 (experimental).
>> 2010-11-04  Joern Rennecke  <amylaar@spamcop.net>
>> 
>> 	PR target/44750
>> 	* config/pdp11/pdp11.c: (pdp11_secondary_reload): Now static.
>> 	(pdp11_preferred_reload_class): Rename class to rclass.
>> 	(pdp11_preferred_output_reload_class): Likewise.
>> 	* config/pdp11/t-pdp11 (dwarf2out.o): Add -Wno-error=type-limits to
>> 	ALL_COMPILERFLAGS .
>> 	(java/constants.o): Add -Wno-error to ALL_COMPILERFLAGS.
>> 
>> Index: config/pdp11/pdp11.c
>> ===================================================================
>> --- config/pdp11/pdp11.c	(revision 166313)
>> +++ config/pdp11/pdp11.c	(working copy)
>> @@ -1630,18 +1630,18 @@ pdp11_cannot_change_mode_class (enum mac
>> loading is easier into LOAD_FPU_REGS than FPU_REGS! */
>> 
>> static reg_class_t
>> -pdp11_preferred_reload_class (rtx x, reg_class_t class)
>> +pdp11_preferred_reload_class (rtx x, reg_class_t rclass)
>> {
>> -  if (class == FPU_REGS)
>> +  if (rclass == FPU_REGS)
>>    return LOAD_FPU_REGS;
>> -  if (class == ALL_REGS)
>> +  if (rclass == ALL_REGS)
>>    {
>>      if (FLOAT_MODE_P (GET_MODE (x)))
>> 	return LOAD_FPU_REGS;
>>      else
>> 	return GENERAL_REGS;
>>    }
>> -  return class;
>> +  return rclass;
>> }
>> 
>> /* TARGET_PREFERRED_OUTPUT_RELOAD_CLASS
>> @@ -1654,18 +1654,18 @@ pdp11_preferred_reload_class (rtx x, reg
>> loading is easier into LOAD_FPU_REGS than FPU_REGS! */
>> 
>> static reg_class_t
>> -pdp11_preferred_output_reload_class (rtx x, reg_class_t class)
>> +pdp11_preferred_output_reload_class (rtx x, reg_class_t rclass)
>> {
>> -  if (class == FPU_REGS)
>> +  if (rclass == FPU_REGS)
>>    return LOAD_FPU_REGS;
>> -  if (class == ALL_REGS)
>> +  if (rclass == ALL_REGS)
>>    {
>>      if (FLOAT_MODE_P (GET_MODE (x)))
>> 	return LOAD_FPU_REGS;
>>      else
>> 	return GENERAL_REGS;
>>    }
>> -  return class;
>> +  return rclass;
>> }
>> 
>> 
>> @@ -1674,7 +1674,7 @@ pdp11_preferred_output_reload_class (rtx
>>   FPU registers AC4 and AC5 (class NO_LOAD_FPU_REGS) require an 
>>   intermediate register (AC0-AC3: LOAD_FPU_REGS).  Everything else
>>   can be loade/stored directly.  */
>> -reg_class_t 
>> +static reg_class_t 
>> pdp11_secondary_reload (bool in_p ATTRIBUTE_UNUSED,
>> 			rtx x,
>> 			reg_class_t reload_class,
>> Index: config/pdp11/t-pdp11
>> ===================================================================
>> --- config/pdp11/t-pdp11	(revision 166313)
>> +++ config/pdp11/t-pdp11	(working copy)
>> @@ -34,3 +34,13 @@ dp-bit.c: $(srcdir)/config/fp-bit.c
>> 	cat $(srcdir)/config/fp-bit.c > dp-bit.c
>> 
>> MULTILIB_OPTIONS = msoft-float
>> +
>> +# Because the pdp11 POINTER_SIZE is only 16, in dwarf2out.c,
>> +# DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
>> +# (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
>> +# comparison is always false.
>> +dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
>> +
>> +# Likewise, java/constants.c:build_constants_constructor has a negative shift
>> +# count (in never-executed code) due to the small POINTER_SIZE.
>> +java/constants.o: ALL_COMPILERFLAGS += -Wno-error
> 

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

* Re: RFA: Fix target/44750
       [not found] ` <76BC23E8-E889-405A-9CBD-651F4D63A4B6@dell.com>
@ 2010-11-05  4:53   ` Joern Rennecke
  2010-11-05 10:55     ` Paul Koning
  0 siblings, 1 reply; 5+ messages in thread
From: Joern Rennecke @ 2010-11-05  4:53 UTC (permalink / raw)
  To: Paul Koning; +Cc: gcc-patches

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

Quoting Paul Koning <paul_koning@dell.com>:

> Joern,
>
> I ran into a problem with this.

Oops, while we can rely on a fairly recent version of GNU make, the same
is not true of the bootstrap compiler.  So there is still a good reason
to stick to the *.o-warn mechanism.

The attached patch makes use of this so that we use just -Wno-error, and only
when we're actually using -Werror in the first place.

OK to apply?



[-- Attachment #2: pdp11-warn-diff --]
[-- Type: text/plain, Size: 1060 bytes --]

2010-11-05  Joern Rennecke  <amylaar@spamcop.net>

	 PR target/44750
        * config/pdp11/t-pdp11 (dwarf2out.o, java/constants.o): Undo last
	change.  Set $@-warn.o to -Wno-error.

Index: config/pdp11/t-pdp11
===================================================================
--- config/pdp11/t-pdp11	(revision 166331)
+++ config/pdp11/t-pdp11	(working copy)
@@ -39,8 +39,10 @@ MULTILIB_OPTIONS = msoft-float
 # DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
 # (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
 # comparison is always false.
-dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
+# We could say "-Werror -Wno-error=type-limits", alas, not all supported
+# gcc bootstrap compilers support the latter option.
+dwarf2out.o-warn = -Wno-error
 
 # Likewise, java/constants.c:build_constants_constructor has a negative shift
 # count (in never-executed code) due to the small POINTER_SIZE.
-java/constants.o: ALL_COMPILERFLAGS += -Wno-error
+java/constants.o-warn = -Wno-error

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

* Re: RFA: Fix target/44750
  2010-11-05  4:53   ` Joern Rennecke
@ 2010-11-05 10:55     ` Paul Koning
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Koning @ 2010-11-05 10:55 UTC (permalink / raw)
  To: Joern Rennecke; +Cc: gcc-patches

Ok.  Thanks!

	paul

On Nov 5, 2010, at 12:35 AM, Joern Rennecke wrote:

> Quoting Paul Koning <paul_koning@dell.com>:
> 
>> Joern,
>> 
>> I ran into a problem with this.
> 
> Oops, while we can rely on a fairly recent version of GNU make, the same
> is not true of the bootstrap compiler.  So there is still a good reason
> to stick to the *.o-warn mechanism.
> 
> The attached patch makes use of this so that we use just -Wno-error, and only
> when we're actually using -Werror in the first place.
> 
> OK to apply?
> 
> 
> 2010-11-05  Joern Rennecke  <amylaar@spamcop.net>
> 
> 	 PR target/44750
>        * config/pdp11/t-pdp11 (dwarf2out.o, java/constants.o): Undo last
> 	change.  Set $@-warn.o to -Wno-error.
> 
> Index: config/pdp11/t-pdp11
> ===================================================================
> --- config/pdp11/t-pdp11	(revision 166331)
> +++ config/pdp11/t-pdp11	(working copy)
> @@ -39,8 +39,10 @@ MULTILIB_OPTIONS = msoft-float
> # DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
> # (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
> # comparison is always false.
> -dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
> +# We could say "-Werror -Wno-error=type-limits", alas, not all supported
> +# gcc bootstrap compilers support the latter option.
> +dwarf2out.o-warn = -Wno-error
> 
> # Likewise, java/constants.c:build_constants_constructor has a negative shift
> # count (in never-executed code) due to the small POINTER_SIZE.
> -java/constants.o: ALL_COMPILERFLAGS += -Wno-error
> +java/constants.o-warn = -Wno-error

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

end of thread, other threads:[~2010-11-05 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-04 18:28 RFA: Fix target/44750 Joern Rennecke
2010-11-04 20:43 ` Paul Koning
2010-11-04 22:50   ` Paul Koning
     [not found] ` <76BC23E8-E889-405A-9CBD-651F4D63A4B6@dell.com>
2010-11-05  4:53   ` Joern Rennecke
2010-11-05 10:55     ` Paul Koning

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