https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120049
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-05-01
--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Here is a reduced case. Adding the 'use, intrinsic :: iso_c_binding' eliminates
the ICE.
module tests
use, intrinsic :: iso_c_binding ! Adding this line eliminates the ICE
use gtk_sup
use gtk, only: gtk_init
use g, only: g_value_init, g_value_unset, g_value_set_int, g_value_get_int, &
& g_value_get_pointer, g_value_set_pointer
implicit none
contains
integer function test_gvalue_routines() result(errors)
type(gvalue), target :: val, val2 ! GValue (opaque) structures
type(c_ptr) :: p_val, p_val2 ! C pointers toward GValue structures
errors = 0
call g_value_unset(p_val)
p_val = g_value_init(p_val, G_TYPE_POINTER)
call g_value_set_pointer(p_val, c_loc(val))
p_val2 = g_value_get_pointer(p_val)
! FIXME: the following lines compiles with Intel ifx but causes an internal
! error with GFortran 14.2.0:
if (.not.c_associated(p_val2, c_loc(val))) then
print '(A)', "Problem!"
errors = errors + 1
end if
end function test_gvalue_routines
end module tests
program tests_gtk_sup
use tests
implicit none
integer :: errors = 0
call gtk_init()
print '(A)', "> test_gvalue_routines()"
errors = errors + test_gvalue_routines()
print *
if (errors == 0) then
print '(A)', "No error"
else
print *, errors, "errors"
print '(A)', "See the 'tests_errors.txt' file"
end if
end program tests_gtk_sup