This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is there a PR open for this code?


Dominique Dhumieres wrote:
Compiling the code with -Wuninitialized gives

alloc_func.f90: In function 'no_leak':
alloc_func.f90:3: warning: 'i' is used uninitialized in this function
alloc_func.f90:3: warning: 'n' is used uninitialized in this function

However I think there is a missing check that the shapes of the lhs and
rhs are the same in

x=(/(i, i=1, n)/)

which should be rejected if n /= 100.

Is there a PR open for that or should I open one?

Is this not caught by bounds-checking at runtime? I don't see how this could be done at compile-time.


Cheers,
- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]