- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shown below is a minimal reproducer of an issue extracted from another thread. It works as expected using Intel Fortran 18.0 update 3: A support request has been submitted with Intel.
module m type :: a integer :: i = 0 end type type :: b integer, allocatable :: j(:) contains procedure :: assign_b generic :: assignment(=) => assign_b !<-- Comment this line and this test works end type type :: c type(a) :: foo type(b) :: bar end type contains elemental subroutine assign_b( lhs, rhs ) class(b), intent(inout) :: lhs type(b), intent(in) :: rhs end subroutine end module m
use m, only : c type(c) :: x(2) type(c), allocatable :: y(:) x%foo%i = [ 1, 2 ] y = x print *, "y%foo%i = ", y%foo%i, "; expected = ", x%foo%i if ( any(y%foo%i /= x%foo%i) ) stop "FAILURE" stop "SUCCESS" end
With 19.0 release,
C:\Temp>ifort /standard-semantics p.f90 Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R ) 64, Version 19.0.0.117 Build 20180804 Copyright (C) 1985-2018 Intel Corporation. All rights reserved. Microsoft (R) Incremental Linker Version 14.14.26433.0 Copyright (C) Microsoft Corporation. All rights reserved. -out:p.exe -subsystem:console p.obj C:\Temp>p.exe y%foo%i = 2 6226020 ; expected = 1 2 FAILURE C:\Temp>
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page