aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2021-03-17 14:13:10 +0000
committerAndrew Stubbs <ams@codesourcery.com>2021-03-18 17:38:51 +0000
commit55308fc26318427c1438cecc60ddd7ba24d5cd33 (patch)
treeff1e07a77bb09887824d633c90ea70ac84f276e8 /gcc
parentab03c0d5753549f1a78eeb706510b55fb97c8651 (diff)
downloadgcc-55308fc26318427c1438cecc60ddd7ba24d5cd33.zip
gcc-55308fc26318427c1438cecc60ddd7ba24d5cd33.tar.gz
gcc-55308fc26318427c1438cecc60ddd7ba24d5cd33.tar.bz2
amdgcn: Silence warnings in gcn.c
This fixes a few cases of "unquoted identifier or keyword", one "spurious trailing punctuation sequence", and a "may be used uninitialized". gcc/ChangeLog: * config/gcn/gcn.c (gcn_parse_amdgpu_hsa_kernel_attribute): Add %< and %> quote markers to error messages. (gcn_goacc_validate_dims): Likewise. (gcn_conditional_register_usage): Remove exclaimation mark from error message. (gcn_vectorize_vec_perm_const): Ensure perm is fully uninitialized.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/gcn/gcn.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c
index e8bb0b6..22da37e 100644
--- a/gcc/config/gcn/gcn.c
+++ b/gcc/config/gcn/gcn.c
@@ -228,7 +228,7 @@ gcn_parse_amdgpu_hsa_kernel_attribute (struct gcn_kernel_args *args,
const char *str;
if (TREE_CODE (TREE_VALUE (list)) != STRING_CST)
{
- error ("amdgpu_hsa_kernel attribute requires string constant "
+ error ("%<amdgpu_hsa_kernel%> attribute requires string constant "
"arguments");
break;
}
@@ -241,13 +241,14 @@ gcn_parse_amdgpu_hsa_kernel_attribute (struct gcn_kernel_args *args,
}
if (a == GCN_KERNEL_ARG_TYPES)
{
- error ("unknown specifier %s in amdgpu_hsa_kernel attribute", str);
+ error ("unknown specifier %qs in %<amdgpu_hsa_kernel attribute%>",
+ str);
err = true;
break;
}
if (args->requested & (1 << a))
{
- error ("duplicated parameter specifier %s in amdgpu_hsa_kernel "
+ error ("duplicated parameter specifier %qs in %<amdgpu_hsa_kernel%> "
"attribute", str);
err = true;
break;
@@ -2102,7 +2103,7 @@ gcn_conditional_register_usage (void)
/* Requesting a set of args different from the default violates the ABI. */
if (!leaf_function_p ())
warning (0, "A non-default set of initial values has been requested, "
- "which violates the ABI!");
+ "which violates the ABI");
for (int i = SGPR_REGNO (0); i < SGPR_REGNO (14); i++)
fixed_regs[i] = 0;
@@ -3983,6 +3984,8 @@ gcn_vectorize_vec_perm_const (machine_mode vmode, rtx dst,
unsigned int perm[64];
for (unsigned int i = 0; i < nelt; ++i)
perm[i] = sel[i] & (2 * nelt - 1);
+ for (unsigned int i = nelt; i < 64; ++i)
+ perm[i] = 0;
src0 = force_reg (vmode, src0);
src1 = force_reg (vmode, src1);
@@ -4882,8 +4885,8 @@ gcn_goacc_validate_dims (tree decl, int dims[], int fn_level,
warning_at (decl ? DECL_SOURCE_LOCATION (decl) : UNKNOWN_LOCATION,
OPT_Wopenacc_dims,
(dims[GOMP_DIM_VECTOR]
- ? G_("using vector_length (64), ignoring %d")
- : G_("using vector_length (64), "
+ ? G_("using %<vector_length (64)%>, ignoring %d")
+ : G_("using %<vector_length (64)%>, "
"ignoring runtime setting")),
dims[GOMP_DIM_VECTOR]);
dims[GOMP_DIM_VECTOR] = 1;
@@ -4895,7 +4898,7 @@ gcn_goacc_validate_dims (tree decl, int dims[], int fn_level,
{
warning_at (decl ? DECL_SOURCE_LOCATION (decl) : UNKNOWN_LOCATION,
OPT_Wopenacc_dims,
- "using num_workers (%d), ignoring %d",
+ "using %<num_workers (%d)%>, ignoring %d",
max_workers, dims[GOMP_DIM_WORKER]);
dims[GOMP_DIM_WORKER] = max_workers;
changed = true;