public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH,Fortran 0/7] delete some unused decls, make static
@ 2021-10-24 22:30 Bernhard Reutner-Fischer
  2021-10-24 22:30 ` [PATCH,Fortran 1/7] Fortran: make some trans* functions static Bernhard Reutner-Fischer
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Bernhard Reutner-Fischer @ 2021-10-24 22:30 UTC (permalink / raw)
  To: gcc-patches, fortran

Hi!

Quickly skimming through the frontend headers.
There are a couple of declarations for functions that do not have
definitions. And there are a couple of functions that can be static.

Notes i took while at it / TODOs:

- get rid of VTAB_GET_FIELD_GEN and unused extern decls
- The last block of gfc_trans_vla_one_sizepos() could simply use
  gfc_evaluate_now_function_scope(). Passing down unshared val of course.
- trans-expr.c has one use of gfc_evaluate_now_loc() but should simply use
  gfc_evaluate_now() there; Calling ...now_loc(input_location) is superfluous
- s/mane/name/;# in git grep -w mane gcc/fortran/
- delete gfc_match_small_int, use gfc_match_small_literal_int instead
- move gfc_match_null definition up before first user, make it static
  and delete decl from match.h
- gfc_cpp_add_include_path_after move up, make static, rm external decl
- gfc_walk_array_ref move up, make static, rm external decl
- delete unused gfc_copy_only_alloc_comp ?
- delete unused gfc_conv_descriptor_attribute ?
- gfc_build_nan str arg is "" always. Delete parameter and handling?
- delete unused gfc_simplify_get_team or wire it up in intrinsics,
  get_team handling (instead of the NULL..)

Anyone who does coarrays might want to fill in the missing get_team()
simplify and add an appropriate test. That's the only thing that i will
not do as i once was more into MPI and verbs so won't ever do coarrays ;)

Bootstraps fine, regression tests running over night.
Ok for trunk if it passes?

thanks,

Bernhard Reutner-Fischer (7):
  Fortran: make some trans* functions static
  Fortran: make some match* functions static
  Fortran: make some constructor* functions static
  Fortran: make some trans-array functions static
  Fortran: Delete unused decl in trans-stmt.h
  Fortran: Delete unused decl in trans-types.h
  Fortran: Delete unused decl in intrinsic.h

 gcc/fortran/constructor.c | 20 ++------------------
 gcc/fortran/constructor.h | 10 ----------
 gcc/fortran/decl.c        | 15 ++++++++-------
 gcc/fortran/expr.c        |  2 +-
 gcc/fortran/gfortran.h    |  1 -
 gcc/fortran/intrinsic.h   |  4 ----
 gcc/fortran/match.c       | 28 +---------------------------
 gcc/fortran/match.h       | 10 ----------
 gcc/fortran/scanner.c     |  4 ++--
 gcc/fortran/trans-array.c |  2 +-
 gcc/fortran/trans-array.h |  6 ------
 gcc/fortran/trans-expr.c  | 10 +++++-----
 gcc/fortran/trans-stmt.h  |  1 -
 gcc/fortran/trans-types.c | 25 +++----------------------
 gcc/fortran/trans-types.h |  4 ----
 gcc/fortran/trans.c       |  1 -
 gcc/fortran/trans.h       | 11 -----------
 17 files changed, 23 insertions(+), 131 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-10-26  9:41 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-24 22:30 [PATCH,Fortran 0/7] delete some unused decls, make static Bernhard Reutner-Fischer
2021-10-24 22:30 ` [PATCH,Fortran 1/7] Fortran: make some trans* functions static Bernhard Reutner-Fischer
2021-10-25  5:47   ` Thomas Koenig
2021-10-25  6:43     ` Tobias Burnus
2021-10-25  8:00       ` Bernhard Reutner-Fischer
2021-10-26  9:34   ` Tobias Burnus
2021-10-24 22:30 ` [PATCH,Fortran 2/7] Fortran: make some match* " Bernhard Reutner-Fischer
2021-10-26  9:37   ` Tobias Burnus
2021-10-24 22:30 ` [PATCH,Fortran 3/7] Fortran: make some constructor* " Bernhard Reutner-Fischer
2021-10-26  9:30   ` Tobias Burnus
2021-10-24 22:30 ` [PATCH,Fortran 4/7] Fortran: make some trans-array " Bernhard Reutner-Fischer
2021-10-26  9:39   ` Tobias Burnus
2021-10-24 22:30 ` [PATCH,Fortran 5/7] Fortran: Delete unused decl in trans-stmt.h Bernhard Reutner-Fischer
2021-10-26  9:40   ` Tobias Burnus
2021-10-24 22:30 ` [PATCH,Fortran 6/7] Fortran: Delete unused decl in trans-types.h Bernhard Reutner-Fischer
2021-10-26  9:40   ` Tobias Burnus
2021-10-24 22:30 ` [PATCH,Fortran 7/7] Fortran: Delete unused decl in intrinsic.h Bernhard Reutner-Fischer
2021-10-24 22:46 ` [PATCH,Fortran 0/7] delete some unused decls, make static Bernhard Reutner-Fischer
2021-10-25  9:25 ` Bernhard Reutner-Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).