Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Problem with INTENT

rge21
Beginner
413 Views
I believe that I have found a bug in the treatment of INTENT(IN) arguments:

k214 [~/Public/fortran/bugtest3]$ cat test.f90
MODULE Test
IMPLICIT NONE

TYPE :: Point
REAL :: m
END TYPE Point

CONTAINS
FUNCTION Showbug( a ) RESULT ( b )
TYPE(Point), INTENT(IN) :: a(:)
TYPE(Point) :: b(SIZE(a))

b%m=0
a%m=1
END FUNCTION Showbug
END MODULE Test
k214 [~/Public/fortran/bugtest3]$ ifort -V -o test.o -c test.f90
Intel Fortran Compiler for 32-bit applications, Version 8.1 Build 20040803Z Package ID:
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY

k214 [~/Public/fortran/bugtest3]$


There is an assignment to the INTENT(IN) argument a, yet the compiler has not complained.

Regards,

Richard
0 Kudos
1 Reply
Steven_L_Intel1
Employee
413 Views
Thanks - I saw this in comp.lang.fortran and will pass it on.
0 Kudos
Reply