aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-03-29 21:34:30 +0000
committerAndrew Pinski <apinski@marvell.com>2023-03-29 20:49:14 -0700
commita7df3bea9cf1e42d44ec02b548fc43dd214eda79 (patch)
tree37f7d57a3705117977398c2c27acca237e7e6af9
parent3588c8cbc1003d004c3ce5ff96af67aa95c073e9 (diff)
downloadgcc-a7df3bea9cf1e42d44ec02b548fc43dd214eda79.zip
gcc-a7df3bea9cf1e42d44ec02b548fc43dd214eda79.tar.gz
gcc-a7df3bea9cf1e42d44ec02b548fc43dd214eda79.tar.bz2
Fix fc-prototypes usage with C_INT64_T and non LP64 Targets.
The problem here is we were outputing long_long instead of "long long". This was just an oversight and a missing check. Committed as obvious after a bootstrap/test on x86_64-linux-gnu. gcc/fortran/ChangeLog: * dump-parse-tree.cc (get_c_type_name): Fix "long_long" type name to be "long long". Add a comment on why adding 2 to the name too.
-rw-r--r--gcc/fortran/dump-parse-tree.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc
index 3b24bdc..f4490da 100644
--- a/gcc/fortran/dump-parse-tree.cc
+++ b/gcc/fortran/dump-parse-tree.cc
@@ -3696,7 +3696,10 @@ get_c_type_name (gfc_typespec *ts, gfc_array_spec *as, const char **pre,
if (c_interop_kinds_table[i].f90_type == ts->type
&& c_interop_kinds_table[i].value == ts->kind)
{
+ /* Skip over 'c_'. */
*type_name = c_interop_kinds_table[i].name + 2;
+ if (strcmp (*type_name, "long_long") == 0)
+ *type_name = "long long";
if (strcmp (*type_name, "signed_char") == 0)
*type_name = "signed char";
else if (strcmp (*type_name, "size_t") == 0)