===================================================================
@@ -7992,14 +7992,21 @@ rs6000_cannot_force_const_mem (machine_m
can be addressed relative to the toc pointer. */
static bool
-use_toc_relative_ref (rtx sym, machine_mode mode)
+use_toc_relative_ref (rtx sym, machine_mode mode ATTRIBUTE_UNUSED)
{
return ((constant_pool_expr_p (sym)
&& ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (get_pool_constant (sym),
get_pool_mode (sym)))
|| (TARGET_CMODEL == CMODEL_MEDIUM
&& SYMBOL_REF_LOCAL_P (sym)
- && GET_MODE_SIZE (mode) <= POWERPC64_TOC_POINTER_ALIGNMENT));
+ /* If the linker says that TOC alignment is 256 bits, this test
+ will always be true, since GET_MODE_SIZE returns an unsigned
+ char on the PowerPC. Prevent an warning/error in this
+ case. */
+#if POWERPC64_TOC_POINTER_ALIGNMENT < 256
+ && GET_MODE_SIZE (mode) <= POWERPC64_TOC_POINTER_ALIGNMENT
+#endif
+ ));
}
/* Our implementation of LEGITIMIZE_RELOAD_ADDRESS. Returns a value to