Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28474 Discussions

size of undefined allocatable array different than zero !

Renaud_Egal
Novice
299 Views

Hello !

I've been working on migrating old Compaq projects to Intel Visual Fortran. I'm hitting some problems and I can't find any solution on this forum. Please help me.

First, I have to mention that these are large complex and most of all confidential projects, so I won't provide them entirely for these reasons.

The first problem I encountered is the one showed in the attached project : when I try to get the size of a deallocated array, I get the size of the array before deallocating... That's something that wasn't happening with CVF.

If you have any advice on that, I'm all ears !

Cheers

Renaud Egal

Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.5.51209 RTMRel

Installed Version: IDE Standard

Microsoft Visual Web Developer 2010   01011-532-2002361-70018
Microsoft Visual Web Developer 2010

Intel(R) Visual Fortran     Package ID: w_fcompxe_2013_sp1.4.237
Intel(R) Visual Fortran Composer XE 2013 SP1 Update 4 Integration for Microsoft Visual Studio* 2010, 14.0.0100.2010, Copyright (C) 2002-2014 Intel Corporation
* Other names and brands may be claimed as the property of others.

This product includes software developed at The Apache Software Foundation (http://www.apache.org/).

Portions of this software were originally based on the following:
- software copyright (c) 1999, IBM Corporation., http://www.ibm.com.
- software copyright (c) 1999, Sun Microsystems., http://www.sun.com.
- the W3C consortium (http://www.w3c.org) ,
- the SAX project (http://www.saxproject.org)
- voluntary contributions made by Paul Eng on behalf of the Apache Software Foundation that were originally developed at iClick, Inc., software copyright (c) 1999.

This product includes updcrc macro, Satchell Evaluations and Chuck Forsberg. Copyright (C) 1986 Stephen Satchell.

This product includes software developed by the MX4J project (http://mx4j.sourceforge.net).

This product includes ICU 1.8.1 and later.Copyright (c) 1995-2006 International Business Machines Corporation and others.

Portions copyright (c) 1997-2007 Cypress Semiconductor Corporation. All rights reserved.

This product includes XORP. Copyright (c) 2001-2004 International Computer Science Institute

This product includes software from the book "Linux Device Drivers" by Alessandro Rubini and Jonathan Corbet, published by O'Reilly & Associates.

This product includes hashtab.c. Bob Jenkins, 1996.

 

0 Kudos
2 Replies
Steven_L_Intel1
Employee
299 Views

Your program is incorrect - the definition of the SIZE intrinsic says, for the array argument, "It shall not be an unallocated allocatable variable or a pointer that is not associated." Your assumption that the SIZE of an unallocated array is zero is mistaken, and the result of SIZE in this case is unpredictable.

0 Kudos
Renaud_Egal
Novice
299 Views

okay, good to know ;)

now i have to change the ocurrences in source code

thanks Steve !

0 Kudos
Reply