aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2025-08-28 22:07:10 +0200
committerHarald Anlauf <anlauf@gmx.de>2025-08-29 18:42:38 +0200
commit18e49f19f5907de8d28cd33a8789946a3f5092ce (patch)
treeb034353f8316f75012bb0f54e4496997b6b12236 /libjava
parent79e0dbf1c44fc23d870b8a08ad3562454efea015 (diff)
downloadgcc-18e49f19f5907de8d28cd33a8789946a3f5092ce.zip
gcc-18e49f19f5907de8d28cd33a8789946a3f5092ce.tar.gz
gcc-18e49f19f5907de8d28cd33a8789946a3f5092ce.tar.bz2
Fortran: improve compile-time checking of character dummy arguments [PR93330]
PR fortran/93330 gcc/fortran/ChangeLog: * interface.cc (get_sym_storage_size): Add argument size_known to indicate that the storage size could be successfully determined. (get_expr_storage_size): Likewise. (gfc_compare_actual_formal): Use them to handle zero-sized dummy and actual arguments. If a character formal argument has the pointer or allocatable attribute, or is an array that is not assumed or explicit size, we generate an error by default unless -std=legacy is specified, which falls back to just giving a warning. If -Wcharacter-truncation is given, warn on a character actual argument longer than the dummy. Generate an error for too short scalar character arguments if -std=f* is given instead of just a warning. gcc/testsuite/ChangeLog: * gfortran.dg/argument_checking_15.f90: Adjust dg-pattern. * gfortran.dg/bounds_check_strlen_7.f90: Add dg-pattern. * gfortran.dg/char_length_3.f90: Adjust options. * gfortran.dg/whole_file_24.f90: Add dg-pattern. * gfortran.dg/whole_file_29.f90: Likewise. * gfortran.dg/argument_checking_27.f90: New test.
Diffstat (limited to 'libjava')
0 files changed, 0 insertions, 0 deletions