Strange error

jdelia@intec.unl.edu.ar jdelia@intec.unl.edu.ar
Wed Mar 18 12:10:48 GMT 2026


  Hi all,

By the way, with

$ gfortran --version
GNU Fortran (GCC) 16.0.0 20251216 (experimental)
Copyright (C) 2025 Free Software Foundation, Inc.

$ cat /proc/version
Linux version 6.19.6-200.fc43.x86_64  
(mockbuild@41821fa48c8f47b3bd467b54da433509) (gcc (GCC) 15.2.1  
20260123 (Red Hat 15.2.1-7), GNU ld version 2.45.1-4.fc43) #1 SMP  
PREEMPT_DYNAMIC Thu Mar  5 00:10:35 UTC 2026

$ gfortran --version
GNU Fortran (GCC) 16.0.0 20251216 (experimental)
Copyright (C) 2025 Free Software Foundation, Inc.

$ gfortran -c salvatore.f90 
salvatore.f90:30:13:

   30 |     procedure, pass (a) :: csgrw    => psb_d_mf_csgrw
      |             1
Error: Argument mismatch for the overriding procedure ‘csgrw’ at (1):  
Shape mismatch in argument 'iren'

Regards,
Jorge.

--
Arjen Markus <arjen.markus895@gmail.com> escribió:

> FWIW, the ifx compiler accepts the code, even when asking for all  
> possible warnings (-warn:all).
>
>      Op wo 18 mrt 2026 om 11:06 schreef Salvatore Filippone  
> <filippone.salvatore@gmail.com>:
>
>> Hi there, 
>>      while experimenting with some code variations, I encountered a  
>> rather strange error message
>>      There are multiple ways to get rid of the message, such as  
>> altering the IMPORT statement at line 33, change some names by  
>> taking out prefixes, or changes "d_" into "r_". 
>>      flang compiles without complaints. 
>>      ============ sh ==========
>>      [sfilippo@euler BUG]$ flang --version
>> flang version 21.1.8 (Fedora 21.1.8-4.fc43)
>> Target: x86_64-redhat-linux-gnu
>> Thread model: posix
>> InstalledDir: /usr/bin
>> [sfilippo@euler BUG]$ flang -c d_mf_m.f90
>> [sfilippo@euler BUG]$ gfortran --version
>> GNU Fortran (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7)
>> Copyright (C) 2025 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
>> [sfilippo@euler BUG]$ gfortran -c d_mf_m.f90
>> d_mf_m.f90:27:13:
>>
>>    27 |     procedure, pass(a) :: csgrw     => psb_d_mf_csgrw
>>       |             1
>> Error: Argument mismatch for the overriding procedure ‘csgrw’ at  
>> (1): Shape mismatch in argument 'iren'
>> [sfilippo@euler BUG]$
>>  
>>      Is this user error, bug or what? 
>>      Thanks
>>      Salvatore  
>>       
>>      ===================d_mf_m.f90===========
>>      module psb_base_spm_mod
>>   type  :: psb_base_spm
>>   end type psb_base_spm
>> end module psb_base_spm_mod
>>
>> module psb_r_base_spm_mod
>>   use psb_base_spm_mod
>>   type, extends(psb_base_spm) :: psb_r_base_spm
>>   contains
>>     procedure, pass(a) :: csgrw      => psb_r_base_csgrw
>>   end type psb_r_base_spm
>>
>>   interface
>>     subroutine psb_r_base_csgrw(a,iren)
>>       import
>>       class(psb_r_base_spm), intent(in) :: a
>>       integer, intent(in), optional        :: iren(:)
>>     end subroutine psb_r_base_csgrw
>>   end interface
>> end module psb_r_base_spm_mod
>>
>> module psb_d_mf_mat_mod
>>   use psb_r_base_spm_mod
>>   type, extends(psb_r_base_spm) :: psb_d_mf_spm
>>     procedure(d_mf_mv), pass(a), pointer :: var_csmv => null()
>>   contains
>>     procedure, pass(a) :: csgrw     => psb_d_mf_csgrw
>>     procedure, pass(a) :: set_csmv     => d_mf_set_csmv
>>   end type psb_d_mf_spm
>>
>>   interface
>>     subroutine d_mf_mv(a,x,info)
>>       import :: psb_d_mf_spm
>>       class(psb_d_mf_spm), intent(in) :: a
>>       real, intent(in)       :: x(:)
>>       integer, intent(out)    :: info
>>     end subroutine d_mf_mv
>>   end interface
>>
>>   interface
>>     subroutine psb_d_mf_csgrw(a,iren)
>>       import
>>       class(psb_d_mf_spm), intent(in) :: a
>>       integer, intent(in), optional :: iren(:)
>>     end subroutine psb_d_mf_csgrw
>>   end interface
>>
>> contains
>>   subroutine  d_mf_set_csmv(func,a)
>>     implicit none
>>     class(psb_d_mf_spm), intent(inout) :: a
>>     procedure(d_mf_mv) :: func
>>     a%var_csmv => func  
>>     return
>>   end subroutine d_mf_set_csmv
>> end module psb_d_mf_mat_mod
>> ==========================================



 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20260318/f5ad9f5b/attachment.htm>


More information about the Fortran mailing list