aboutsummaryrefslogtreecommitdiff
path: root/libcpp/errors.cc
diff options
context:
space:
mode:
authorTobias Burnus <tburnus@baylibre.com>2024-10-12 10:48:41 +0200
committerTobias Burnus <tburnus@baylibre.com>2024-10-12 10:48:41 +0200
commitc20c9d8408f0ff4677acbd96f4803c191bd13ac6 (patch)
tree05d8eab47fc0ea5febb89264feabd44ae19ac7b8 /libcpp/errors.cc
parenta564261245ad3002d53916e017b85939ace816a6 (diff)
downloadgcc-c20c9d8408f0ff4677acbd96f4803c191bd13ac6.zip
gcc-c20c9d8408f0ff4677acbd96f4803c191bd13ac6.tar.gz
gcc-c20c9d8408f0ff4677acbd96f4803c191bd13ac6.tar.bz2
Fortran: Unify gfc_get_location handling; fix expr->ts bug
This commit reduces code duplication by moving gfc_get_location from trans.cc to error.cc. The gcc_assert is now used more often and reveald a bug in gfc_match_array_constructor where the union expr->ts.u.derived of a derived type is partially overwritten by the assignment expr->ts.u.cl->... as a ts.type == BT_CHARACTER check was missing. gcc/fortran/ChangeLog: * array.cc (gfc_match_array_constructor): Only update the character length if the expression is of character type. * error.cc (gfc_get_location_with_offset): New; split off from ... (gfc_format_decoder): ... here; call it. * gfortran.h (gfc_get_location_with_offset): New prototype. (gfc_get_location): New inline function. * trans.cc (gfc_get_location): Remove function definition. * trans.h (gfc_get_location): Remove declaration.
Diffstat (limited to 'libcpp/errors.cc')
0 files changed, 0 insertions, 0 deletions