diff options
author | Henry Linjamäki <henry.linjamaki@parmance.com> | 2017-11-17 14:00:46 +0000 |
---|---|---|
committer | Pekka Jääskeläinen <visit0r@gcc.gnu.org> | 2017-11-17 14:00:46 +0000 |
commit | 610f66a3d14e56dee60cd542579ffbf14f803d80 (patch) | |
tree | ade6e85090adf944a9dea7cbdbd998ff7f45875c /gcc/brig | |
parent | 34705fdc3b33df1e354c907e526761296333e103 (diff) | |
download | gcc-610f66a3d14e56dee60cd542579ffbf14f803d80.zip gcc-610f66a3d14e56dee60cd542579ffbf14f803d80.tar.gz gcc-610f66a3d14e56dee60cd542579ffbf14f803d80.tar.bz2 |
[BRIGFE] Fix sprintf format string type mismatch on 32b machines.
From-SVN: r254870
Diffstat (limited to 'gcc/brig')
-rw-r--r-- | gcc/brig/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/brig/brigfrontend/brig-util.cc | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/brig/ChangeLog b/gcc/brig/ChangeLog index 17cc3bc..ba07ca3 100644 --- a/gcc/brig/ChangeLog +++ b/gcc/brig/ChangeLog @@ -1,3 +1,8 @@ +2017-11-17 Henry Linjamäki <henry.linjamaki@parmance.com> + + * brigfrontend/brig-util.cc: Fix sprintf format string type mismatch + on 32b machines. + 2017-11-16 Henry Linjamäki <henry.linjamaki@parmance.com> Change internal representation of HSA registers. Instead diff --git a/gcc/brig/brigfrontend/brig-util.cc b/gcc/brig/brigfrontend/brig-util.cc index ca93247..f8b6832 100644 --- a/gcc/brig/brigfrontend/brig-util.cc +++ b/gcc/brig/brigfrontend/brig-util.cc @@ -505,9 +505,10 @@ gccbrig_hsa_reg_id (const BrigOperandRegister ®) } std::string -gccbrig_hsa_reg_name_from_id (size_t reg_hash) +gccbrig_hsa_reg_name_from_id (size_t reg_id) { char reg_name[32]; + long unsigned int reg_hash = (long unsigned int) reg_id; if (reg_hash < BRIG_2_TREE_HSAIL_C_REG_COUNT) { sprintf (reg_name, "$c%lu", reg_hash); @@ -556,7 +557,7 @@ gccbrig_print_reg_use_info (FILE *dump, const regs_use_index &info) reg_use_it end_it2 = info.m_type_refs.end (); for (reg_use_it it2 = begin_it2; it2 != end_it2; it2++) { - fprintf (dump, "(%lu) ", it2->second); + fprintf (dump, "(%lu) ", (long unsigned int) it2->second); print_node_brief (dump, "", it2->first, 0); fprintf (dump, "\n"); } |