diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-05-19 19:41:16 -0700 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2025-05-31 10:33:45 -0700 |
commit | 41dee7da08873721a719849d19ef07c027e76dfb (patch) | |
tree | 0080666a2d163f06339948ad83e3cf277b4ffe79 /gcc/dwarf2ctf.cc | |
parent | d8e7a2dbe736a57e4cec0293387a1c558b5a155e (diff) | |
download | gcc-41dee7da08873721a719849d19ef07c027e76dfb.zip gcc-41dee7da08873721a719849d19ef07c027e76dfb.tar.gz gcc-41dee7da08873721a719849d19ef07c027e76dfb.tar.bz2 |
Fortran: Fix c_associated argument checks.
PR fortran/120049
gcc/fortran/ChangeLog:
* check.cc (gfc_check_c_associated): Use new helper functions.
Only call check_c_ptr_1 if optional c_ptr_2 tests succeed.
(check_c_ptr_1): Handle only c_ptr_1 checks.
(check_c_ptr_2): Expand checks for c_ptr_2 and handle cases
where there is no derived pointer in the gfc_expr and check
the inmod_sym_id only if it exists. Rephrase error message.
* misc.cc (gfc_typename): Handle the case for BT_VOID rather
than throw an internal error.
gcc/testsuite/ChangeLog:
* gfortran.dg/pr120049_a.f90: Update test directives.
* gfortran.dg/pr120049_b.f90: Update test directives
* gfortran.dg/pr120049_2.f90: New test.
* gfortran.dg/c_f_pointer_tests_6.f90: Adjust dg-error
directive.
Co-Authored-By: Steve Kargl <kargl@gcc.gnu.org>
(cherry picked from commit 42983ffde6612b7f8a4e7ab3e76fa8b0d136e854)
Diffstat (limited to 'gcc/dwarf2ctf.cc')
0 files changed, 0 insertions, 0 deletions