Skip to content

[Fortran] mark rhs LEN parameter tests as implemented #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 8 additions & 23 deletions Fortran/gfortran/regression/DisabledFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -717,29 +717,6 @@ file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS
pr50769.f90
realloc_on_assign_16a.f90

# unimplemented: gather rhs LEN parameters in assignment to allocatable
allocate_assumed_charlen_4.f90
allocate_error_5.f90
associate_58.f90
bounds_check_22.f90
char_length_20.f90
char_length_21.f90
deferred_character_1.f90
deferred_character_14.f90
deferred_character_2.f90
deferred_character_21.f90
deferred_character_22.f90
deferred_character_27.f90
deferred_character_34.f90
deferred_character_4.f90
deferred_character_7.f90
dependency_50.f90
dependency_51.f90
elemental_function_3.f90
elemental_function_2.f90
realloc_on_assign_14.f90
widechar_11.f90
Copy link
Contributor

@tarunprabhu tarunprabhu Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

widechar_11.f90 fails to compile for me on Linux x86_64.

Fortran/gfortran/regression/widechar_11.f90:14:1: error: No intrinsic or user-defined ASSIGNMENT(=) matches operand types TYPE(c_ptr) and TYPE(__builtin_c_ptr)
  cptr = c_loc(a4str)
  ^^^^^^^^^^^^^^^^^^^
Fortran/gfortran/regression/widechar_11.f90:14:14: warning: C_LOC() argument has non-interoperable intrinsic type, kind, or length
  cptr = c_loc(a4str)
               ^^^^^
Fortran/gfortran/regression/widechar_11.f90:15:1: error: No intrinsic or user-defined ASSIGNMENT(=) matches operand types TYPE(c_ptr) and TYPE(__builtin_c_ptr)
  cptr2 = c_loc(a4str2)
  ^^^^^^^^^^^^^^^^^^^^^
Fortran/gfortran/regression/widechar_11.f90:15:15: warning: C_LOC() argument has non-interoperable intrinsic type, kind, or length
  cptr2 = c_loc(a4str2)
                ^^^^^^
Fortran/gfortran/regression/widechar_11.f90:31:11: error: No specific function of generic 'c_associated' matches the actual arguments
  if (.not. c_associated (cptr, c_loc(a4str))) error stop
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fortran/gfortran/regression/widechar_11.f90:31:37: warning: C_LOC() argument has non-interoperable intrinsic type, kind, or length
  if (.not. c_associated (cptr, c_loc(a4str))) error stop
                                      ^^^^^
Fortran/gfortran/regression/widechar_11.f90:32:11: error: No specific function of generic 'c_associated' matches the actual arguments
  if (.not. c_associated (cptr2, c_loc(a4str2))) error stop
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fortran/gfortran/regression/widechar_11.f90:32:38: warning: C_LOC() argument has non-interoperable intrinsic type, kind, or length
  if (.not. c_associated (cptr2, c_loc(a4str2))) error stop
                                       ^^^^^^

Perhaps the configuration parameters are different?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking this. I couldn't reproduce this with or without optimization flags so I guess it really is something to do with definitions of C pointers on different platforms. Strange.


# unimplemented: passing dynamically optional argument to elemental procedures
bounds_check_9.f90
bounds_check_fail_2.f90
Expand Down Expand Up @@ -988,6 +965,9 @@ file(GLOB UNIMPLEMENTED_FILES CONFIGURE_DEPENDS
forall_3.f90
pr49698.f90

# unimplemented: compute elemental function result length parameters in HLFIR
elemental_function_3.f90

# These tests are NYI: support for polymorphic types; when polymorphic
# type support is enabled by option, they pass. Delete these when
# polymorphic types are enabled by default.
Expand Down Expand Up @@ -1225,6 +1205,7 @@ file(GLOB SKIPPED_FILES CONFIGURE_DEPENDS
pr106918.f90 # NYI: dynamic character length in struct constr
pr92050.f90 # needs -fcheck=all
winapi.f90 # needs -lkernel32 and target *-*-cygwin*
widechar_11.f90 # No ASSIGNMENT matches TYPE(c_ptr) and TYPE(__builtin_c_ptr)

# error: 'fir.convert' op invalid type conversion
achar_4.f90
Expand Down Expand Up @@ -1960,6 +1941,7 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
widechar_intrinsics_8.f90
write_check.f90
zero_sized_1.f90
elemental_function_2.f90

# ---------------------------------------------------------------------------
#
Expand Down Expand Up @@ -2760,4 +2742,7 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS

# Requires -ffloat-store
nearest_1.f90

# Requires -fcheck=mem
allocate_error_5.f90
)