Was this a bug
- From: "David Flower" <DavJFlower@xxxxxxx>
- Date: 28 Sep 2006 06:45:21 -0700
I succeeded in generating code that ollks something like this:
MODULE FRED
INTEGER, ALLOCATABLE :: IARRAY(:)
END MODULE
PROGRAM
etc.etc.
USE FRED
CALL SUB ( IARRAY(7) )
etc.
END
SUBROUTINE SUB ( I )
USE FRED
(Reallocate IARRAY larger, making lower bound more negative)
IARRAY(-3) = I
RETURN
END
I tried it with two compilers, one worked OK, one corrupted IARRAY(7),
but when I stuck in a WRITE statement, it worked OK.
I can see why the program fails, but have difficulty in seeing why it
should ever work correctly.
Any comments out there ?
Is there anything in the standard making the above code illegal ?
Dave Flower
.
- Follow-Ups:
- Re: Was this a bug
- From: Richard Maine
- Re: Was this a bug
- Prev by Date: Re: numeric difference program
- Next by Date: Stack size, and warnings
- Previous by thread: While we are on the subject of modules...
- Next by thread: Re: Was this a bug
- Index(es):