diff mbox series

[committed] dwarf2asm: Fix bootstrap on powerpc*-*-* [PR98839]

Message ID 20210126171714.GD3748@tucnak
State New
Headers show
Series [committed] dwarf2asm: Fix bootstrap on powerpc*-*-* [PR98839] | expand

Commit Message

Jakub Jelinek Jan. 26, 2021, 5:17 p.m. UTC
Hi!

My recent dwarf2asm.c patch broke powerpc*-*-* bootstrap, while most target
define POINTER_SIZE to (cond ? cst1 : cst2) or constant, rs6000 defines
it to a variable, and the arbitrarily chosen type of that variable determines
whether we get warnings on comparison of that against signed or unsigned
ints.

Fixed by adding a cast.

Tested on x86_64-linux and powerpc64le-linux, committed to trunk as obvious.

2021-01-26  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/98839
	* dwarf2asm.c (dw2_assemble_integer): Cast DWARF2_ADDR_SIZE to int
	in comparison.



	Jakub
diff mbox series

Patch

--- gcc/dwarf2asm.c.jj	2021-01-26 09:20:19.242499512 +0100
+++ gcc/dwarf2asm.c	2021-01-26 16:33:20.320710684 +0100
@@ -46,7 +46,7 @@  along with GCC; see the file COPYING3.
 void
 dw2_assemble_integer (int size, rtx x)
 {
-  if (size == 2 * DWARF2_ADDR_SIZE && !CONST_SCALAR_INT_P (x))
+  if (size == 2 * (int) DWARF2_ADDR_SIZE && !CONST_SCALAR_INT_P (x))
     {
       /* On 32-bit targets with -gdwarf64, DImode values with
 	 relocations usually result in assembler errors.  Assume