aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2024-06-20 08:01:36 +0100
committerPaul Thomas <pault@gcc.gnu.org>2024-07-19 21:59:05 +0100
commit5034af8223c0db07cdec01cef70048ec44cdd47b (patch)
treea7e8521efe73b2f5934b01acf08e069c7a982d7a /libstdc++-v3/src
parent1205104bbef40abe3baa5965a676f3b0f68971dd (diff)
downloadgcc-5034af8223c0db07cdec01cef70048ec44cdd47b.zip
gcc-5034af8223c0db07cdec01cef70048ec44cdd47b.tar.gz
gcc-5034af8223c0db07cdec01cef70048ec44cdd47b.tar.bz2
Fortran: Auto array allocation with function dependencies [PR59104]
2024-06-20 Paul Thomas <pault@gcc.gnu.org> gcc/fortran PR fortran/59104 * dependency.cc (dependency_fcn, gfc_function_dependency): New functions to detect dependency in array bounds and character lengths on old style function results. * dependency.h : Add prototype for gfc_function_dependency. * error.cc (error_print): Remove trailing space. * gfortran.h : Remove dummy_order and add fn_result_spec. * symbol.cc : Remove declaration of next_dummy_order.. (gfc_set_sym_referenced): remove setting of symbol dummy order. * trans-array.cc (gfc_trans_auto_array_allocation): Detect non-dummy symbols with function dependencies and put the allocation at the end of the initialization code. * trans-decl.cc : Include dependency.h. (decl_order): New function that determines uses the location field of the symbol 'declared_at' to determine the order of two declarations. (gfc_defer_symbol_init): Call gfc_function_dependency to put dependent symbols in the right part of the tlink chain. Use the location field of the symbol declared_at to determine the order of declarations. (gfc_trans_auto_character_variable): Put character length initialization of dependent symbols at the end of the chain. * trans.cc (gfc_add_init_cleanup): Add boolean argument with default false that determines whther an expression is placed at the back or the front of the initialization chain. * trans.h : Update the prototype for gfc_add_init_cleanup. gcc/testsuite/ PR fortran/59104 * gfortran.dg/dependent_decls_2.f90: New test. (cherry picked from commit ccaa39a268bef2a1d8880022696ff2dcaa6af941)
Diffstat (limited to 'libstdc++-v3/src')
0 files changed, 0 insertions, 0 deletions