https://gcc.gnu.org/g:7be164d7fc738d51b3ea83f6926d7305c3225e1f
commit r17-1030-g7be164d7fc738d51b3ea83f6926d7305c3225e1f Author: Dhruv Chawla <[email protected]> Date: Thu May 14 09:16:32 2026 +0000 libgfortran: Fix typos in various files Signed-off-by: Dhruv Chawla <[email protected]> libgfortran/ChangeLog: * caf/caf_error.h (caf_runtime_error): Fix typos. * caf/libcaf.h: Likewise. * caf/mpi.c (caf_runtime_error): Likewise. * caf/shmem.c (_gfortran_caf_deregister): Likewise. * caf/shmem/alloc.h: Likewise. * caf/shmem/shared_memory.c (shared_memory_get_env): Likewise. * caf/shmem/supervisor.h (struct caf_shmem_token): Likewise. * caf/shmem/teams_mgmt.h (struct caf_shmem_team): Likewise. * caf/single.c (caf_runtime_error): Likewise. (_gfortran_caf_deregister): Likewise. * intrinsics/args.c (get_command_i4): Likewise. * intrinsics/chmod.c: Likewise. * intrinsics/env.c (PREFIX): Likewise. * intrinsics/trigd.c: Likewise. * io/async.c (init_adv_cond): Likewise. * io/file_pos.c (st_rewind): Likewise. * io/format.c (parse_format_list): Likewise. * io/open.c (new_unit): Likewise. (st_open): Likewise. * io/transfer.c (write_block): Likewise. (unformatted_read): Likewise. (unformatted_write): Likewise. (formatted_transfer_scalar_write): Likewise. * io/transfer128.c (export_proto): Likewise. * io/unix.c (buf_init): Likewise. (mem_read): Likewise. * io/write.c (btoa): Likewise. (list_formatted_write): Likewise. * runtime/select_inc.c (select_string): Likewise. Diff: --- libgfortran/caf/caf_error.h | 2 +- libgfortran/caf/libcaf.h | 2 +- libgfortran/caf/mpi.c | 2 +- libgfortran/caf/shmem.c | 2 +- libgfortran/caf/shmem/alloc.h | 2 +- libgfortran/caf/shmem/shared_memory.c | 2 +- libgfortran/caf/shmem/supervisor.h | 2 +- libgfortran/caf/shmem/teams_mgmt.h | 2 +- libgfortran/caf/single.c | 4 ++-- libgfortran/intrinsics/args.c | 2 +- libgfortran/intrinsics/chmod.c | 2 +- libgfortran/intrinsics/env.c | 2 +- libgfortran/intrinsics/trigd.c | 2 +- libgfortran/io/async.c | 2 +- libgfortran/io/file_pos.c | 2 +- libgfortran/io/format.c | 2 +- libgfortran/io/open.c | 4 ++-- libgfortran/io/transfer.c | 10 +++++----- libgfortran/io/transfer128.c | 2 +- libgfortran/io/unix.c | 4 ++-- libgfortran/io/write.c | 4 ++-- libgfortran/runtime/select_inc.c | 2 +- 22 files changed, 30 insertions(+), 30 deletions(-) diff --git a/libgfortran/caf/caf_error.h b/libgfortran/caf/caf_error.h index a7816c24aab8..1ea88951c477 100644 --- a/libgfortran/caf/caf_error.h +++ b/libgfortran/caf/caf_error.h @@ -35,7 +35,7 @@ void caf_runtime_error (const char *format, ...); If additionally `errmsg` is non-NULL, then printf-style `format` will by printed to `errmsg`. If the resulting message is longer then `errmsg_len`, it will be truncated, else filled with spaces. - If `stat` is not given, then the printf-formated message will be emited to + If `stat` is not given, then the printf-formatted message will be emitted to stderr and the program terminates with EXIT_FAILURE. */ void caf_internal_error (const char *format, int *stat, char *errmsg, diff --git a/libgfortran/caf/libcaf.h b/libgfortran/caf/libcaf.h index 3e943d4ac671..7a4dd82cb371 100644 --- a/libgfortran/caf/libcaf.h +++ b/libgfortran/caf/libcaf.h @@ -50,7 +50,7 @@ typedef enum CAF_CURRENT_TEAM } caf_team_level_t; -/* Describes what type of array we are registerring. Keep in sync with +/* Describes what type of array we are registering. Keep in sync with gcc/fortran/trans.h. */ typedef enum caf_register_t { diff --git a/libgfortran/caf/mpi.c b/libgfortran/caf/mpi.c index 9713febb7409..7a9dac06014a 100644 --- a/libgfortran/caf/mpi.c +++ b/libgfortran/caf/mpi.c @@ -72,7 +72,7 @@ caf_runtime_error (const char *message, ...) MPI initialization happened before; otherwise MPI_Initialized had to be used. As the MPI library might modify the command-line arguments, the routine should be called before the run-time - libaray is initialized. */ + library is initialized. */ void _gfortran_caf_init (int *argc, char ***argv) diff --git a/libgfortran/caf/shmem.c b/libgfortran/caf/shmem.c index a83e800d983f..6288d22204c6 100644 --- a/libgfortran/caf/shmem.c +++ b/libgfortran/caf/shmem.c @@ -457,7 +457,7 @@ _gfortran_caf_deregister (caf_token_t *token, caf_deregister_t type, int *stat, ; if (!ca) caf_runtime_error ( - "Coarray token to be freeed is not in current team %d", type); + "Coarray token to be freed is not in current team %d", type); /* Unhook found coarray_allocated node from list... */ pca->next = ca->next; } diff --git a/libgfortran/caf/shmem/alloc.h b/libgfortran/caf/shmem/alloc.h index f5d95b243ef0..dfc1f7ee5703 100644 --- a/libgfortran/caf/shmem/alloc.h +++ b/libgfortran/caf/shmem/alloc.h @@ -30,7 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* High-level interface for shared memory allocation. Handle allocation and freeing of blocks in the shared memory for coarrays. - While allocator keeps track of allocated and freeed portions, this "class" + While allocator keeps track of allocated and freed portions, this "class" allows allocation of coarrays identified by a memid and associate them across images. */ diff --git a/libgfortran/caf/shmem/shared_memory.c b/libgfortran/caf/shmem/shared_memory.c index a2520a89cc7b..a42b0963697c 100644 --- a/libgfortran/caf/shmem/shared_memory.c +++ b/libgfortran/caf/shmem/shared_memory.c @@ -87,7 +87,7 @@ shared_memory_get_env (void) return getenv (ENV_PPID); } -/* Get a pointer into the shared memory block with alignemnt +/* Get a pointer into the shared memory block with alignment (works similar to sbrk). */ shared_mem_ptr diff --git a/libgfortran/caf/shmem/supervisor.h b/libgfortran/caf/shmem/supervisor.h index b1acb323a939..e5c275b65268 100644 --- a/libgfortran/caf/shmem/supervisor.h +++ b/libgfortran/caf/shmem/supervisor.h @@ -98,7 +98,7 @@ struct caf_shmem_token void *base; /* The size of memory in each image aligned on pointer borders, i.e. each images memory starts on an address that is aligned to enable maximum speed - for the processor architecure used. */ + for the processor architecture used. */ size_t image_size; /* The id of this token. */ memid token_id; diff --git a/libgfortran/caf/shmem/teams_mgmt.h b/libgfortran/caf/shmem/teams_mgmt.h index 99189ed85475..f9da4511128b 100644 --- a/libgfortran/caf/shmem/teams_mgmt.h +++ b/libgfortran/caf/shmem/teams_mgmt.h @@ -35,7 +35,7 @@ struct caf_shmem_team int team_no; /* The index is the image's index minus one in this team. I.e. if in Fortran notion the current image is 3, then the value of index is 2. This allows - access to the image_map without having to substract one each time (and + access to the image_map without having to subtract one each time (and missing it). Returning the image's index to the user is rarer, so adding one there is cheaper. */ int index; diff --git a/libgfortran/caf/single.c b/libgfortran/caf/single.c index 43c83e65ec4c..e48aaec6f05e 100644 --- a/libgfortran/caf/single.c +++ b/libgfortran/caf/single.c @@ -117,7 +117,7 @@ caf_runtime_error (const char *message, ...) exit (EXIT_FAILURE); } -/* Error handling is similar everytime. */ +/* Error handling is similar every time. */ static void caf_internal_error (const char *msg, int *stat, char *errmsg, size_t errmsg_len, ...) @@ -313,7 +313,7 @@ _gfortran_caf_deregister (caf_token_t *token, caf_deregister_t type, int *stat, ; if (!ca) caf_runtime_error ( - "Coarray token to be freeed is not in current team %d", type); + "Coarray token to be freed is not in current team %d", type); /* Unhook found coarray_allocated node from list... */ pca->next = ca->next; } diff --git a/libgfortran/intrinsics/args.c b/libgfortran/intrinsics/args.c index 78d714b6905a..cd137490cb6c 100644 --- a/libgfortran/intrinsics/args.c +++ b/libgfortran/intrinsics/args.c @@ -233,7 +233,7 @@ get_command_i4 (char *command, GFC_INTEGER_4 *length, GFC_INTEGER_4 *status, memcpy (&command[tot_len], argv[i], thisarg); } - /* Add the legth of the argument. */ + /* Add the length of the argument. */ tot_len += arglen; if (i != argc - 1) tot_len++; diff --git a/libgfortran/intrinsics/chmod.c b/libgfortran/intrinsics/chmod.c index 4ce8f205a0ac..937cc47ec45f 100644 --- a/libgfortran/intrinsics/chmod.c +++ b/libgfortran/intrinsics/chmod.c @@ -98,7 +98,7 @@ chmod_internal (char *file, char *mode, gfc_charlen_type mode_len) #endif #ifdef HAVE_UMASK - /* Obtain the umask without distroying the setting. */ + /* Obtain the umask without destroying the setting. */ mode_mask = 0; mode_mask = umask (mode_mask); (void) umask (mode_mask); diff --git a/libgfortran/intrinsics/env.c b/libgfortran/intrinsics/env.c index f4d0a5449991..811887c912f5 100644 --- a/libgfortran/intrinsics/env.c +++ b/libgfortran/intrinsics/env.c @@ -69,7 +69,7 @@ PREFIX(getenv) (char * name, char * value, gfc_charlen_type name_len, /* GET_ENVIRONMENT_VARIABLE (name, [value, length, status, trim_name]) is a F2003 intrinsic for getting an environment variable. */ -/* Status codes specifyed by the standard. */ +/* Status codes specified by the standard. */ #define GFC_SUCCESS 0 #define GFC_VALUE_TOO_SHORT -1 #define GFC_NAME_DOES_NOT_EXIST 1 diff --git a/libgfortran/intrinsics/trigd.c b/libgfortran/intrinsics/trigd.c index 905e059458c3..3a34bafa2926 100644 --- a/libgfortran/intrinsics/trigd.c +++ b/libgfortran/intrinsics/trigd.c @@ -1,4 +1,4 @@ -/* Implementation of the degree trignometric functions COSD, SIND, TAND. +/* Implementation of the degree trigonometric functions COSD, SIND, TAND. Copyright (C) 2020-2026 Free Software Foundation, Inc. Contributed by Steven G. Kargl <[email protected]> diff --git a/libgfortran/io/async.c b/libgfortran/io/async.c index 7045ccc2ceb9..b54cc76fa878 100644 --- a/libgfortran/io/async.c +++ b/libgfortran/io/async.c @@ -226,7 +226,7 @@ init_adv_cond (struct adv_cond *ac) __GTHREAD_COND_INIT_FUNCTION (&ac->signal); } -/* Initialize an asyncronous unit, returning zero on success, +/* Initialize an asynchronous unit, returning zero on success, nonzero on failure. It also sets u->au. */ void diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c index da339dc27540..dd04ba454553 100644 --- a/libgfortran/io/file_pos.c +++ b/libgfortran/io/file_pos.c @@ -469,7 +469,7 @@ st_rewind (st_parameter_filepos *fpp) return; } - /* Set this for compatibilty with g77 for /dev/null. */ + /* Set this for compatibility with g77 for /dev/null. */ if (ssize (u->s) == 0) u->endfile = AT_ENDFILE; else diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index cff94a63f792..ce3739a537fe 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -952,7 +952,7 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd) tail->u.real.w = 0; tail->u.real.e = -1; - /* Look for the dot seperator. */ + /* Look for the dot separator. */ u = format_lex (fmt); if (u != FMT_PERIOD) { diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index 4da1270afa37..f2a2fcc26b97 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -683,7 +683,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags *flags) else u->fbuf = NULL; - /* Check if asynchrounous. */ + /* Check if asynchronous. */ if (flags->async == ASYNC_YES) init_async_unit (u); else @@ -827,7 +827,7 @@ st_open (st_parameter_open *opp) find_option (&opp->common, opp->status, opp->status_len, status_opt, "Bad STATUS parameter in OPEN statement"); - /* First, we check wether the convert flag has been set via environment + /* First, we check whether the convert flag has been set via environment variable. This overrides the convert tag in the open statement. */ conv = get_unformatted_convert (opp->common.unit); diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 99e90f3c8034..6c583f76767c 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -46,7 +46,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see For other sorts of data transfer, there are zero or more data transfer statement that depend on the format of the data transfer - statement. For READ (and for backwards compatibily: for WRITE), one has + statement. For READ (and for backwards compatibility: for WRITE), one has transfer_integer transfer_logical @@ -835,7 +835,7 @@ write_block (st_parameter_dt *dtp, size_t length) if (is_internal_unit (dtp)) { - if (is_char4_unit(dtp)) /* char4 internel unit. */ + if (is_char4_unit(dtp)) /* char4 internal unit. */ { gfc_char4_t *dest4; dest4 = mem_alloc_w4 (dtp->u.p.current_unit->s, &length); @@ -1153,7 +1153,7 @@ unformatted_read (st_parameter_dt *dtp, bt type, convert = dtp->u.p.current_unit->flags.convert; if (unlikely (convert != GFC_CONVERT_NATIVE) && kind != 1) { - /* Handle wide chracters. */ + /* Handle wide characters. */ if (type == BT_CHARACTER) { nelems *= size; @@ -1312,7 +1312,7 @@ unformatted_write (st_parameter_dt *dtp, bt type, p = source; - /* Handle wide chracters. */ + /* Handle wide characters. */ if (type == BT_CHARACTER && kind != 1) { nelems *= size; @@ -2601,7 +2601,7 @@ formatted_transfer_scalar_write (st_parameter_dt *dtp, bt type, void *p, int kin /* This function is first called from data_init_transfer to initiate the loop over each item in the format, transferring data as required. Subsequent - calls to this function occur for each data item foound in the READ/WRITE + calls to this function occur for each data item found in the READ/WRITE statement. The item_count is incremented for each call. Since the first call is from data_transfer_init, the item_count is always one greater than the actual count number of the item being transferred. */ diff --git a/libgfortran/io/transfer128.c b/libgfortran/io/transfer128.c index 6e3d9759e16c..ee23a0532e85 100644 --- a/libgfortran/io/transfer128.c +++ b/libgfortran/io/transfer128.c @@ -61,7 +61,7 @@ export_proto(transfer_complex128_write); /* Make sure that libquadmath is pulled in. The functions strtoflt128 - and quadmath_snprintf are weakly referrenced in convert_real and + and quadmath_snprintf are weakly referenced in convert_real and write_float; the pointer assignment with USED attribute make sure that there is a non-weakref dependence if the quadmath functions are used. That avoids segfault when libquadmath is statically linked. */ diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 2a115dc35a59..ce72e0829660 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -773,7 +773,7 @@ buf_init (unix_stream *s, bool unformatted) /* Try to guess a good value for the buffer size. For formatted I/O, we use so many CPU cycles converting the data that there is - more sense in converving memory and especially cache. For + more sense in conserving memory and especially cache. For unformatted, a bigger block can have a large impact in some environments. */ @@ -908,7 +908,7 @@ mem_read (stream *s, void *buf, ssize_t nbytes) } -/* Stream read function for chracter(kind=4) internal units. */ +/* Stream read function for character(kind=4) internal units. */ static ssize_t mem_read4 (stream *s, void *buf, ssize_t nbytes) diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 3b187c618436..2ee6ea59d749 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -1162,7 +1162,7 @@ btoa (GFC_UINTEGER_LARGEST n, char *buffer, size_t len) /* The following three functions, btoa_big, otoa_big, and xtoa_big, are needed to convert large reals with kind sizes that exceed the largest integer type available on certain platforms. In these cases, byte by byte conversion is - performed. Endianess is taken into account. */ + performed. Endianness is taken into account. */ /* Conversion to binary. */ @@ -2530,7 +2530,7 @@ list_formatted_write (st_parameter_dt *dtp, bt type, void *p, int kind, the list. */ /* A generous estimate of the number of characters needed to print - repeat counts and indices, including commas, asterices and brackets. */ + repeat counts and indices, including commas, asterisks and brackets. */ #define NML_DIGITS 20 diff --git a/libgfortran/runtime/select_inc.c b/libgfortran/runtime/select_inc.c index 965496e5087e..864ea5b3cde0 100644 --- a/libgfortran/runtime/select_inc.c +++ b/libgfortran/runtime/select_inc.c @@ -116,7 +116,7 @@ select_string (select_struct *table, int table_len, const CHARTYPE *selector, high = mid; } - /* The string now lies between the low indeces of the now-adjacent + /* The string now lies between the low indices of the now-adjacent high and low entries. Because it is less than the low entry of 'high', it can't be that one. If low is still -1, then no entries match. Otherwise, we have to check the high entry of
