Re: [patch, fortran] Warn about suspicious assignment to contiguous pointers

2017-08-29 Thread Thomas Koenig
Hi Janus, and in that case I would argue that, beyond being "not useful", it's even illegal, so why not throw a hard error, if we can infer at compile-time that the target is non-contiguous? Problem is, we cannot infer this from the tests done. We would also have to add a test if the array is

Re: [patch, fortran] Warn about suspicious assignment to contiguous pointers

2017-08-29 Thread Janus Weil
Hi Thomas, and in that case I would argue that, beyond being "not useful", it's even illegal, so why not throw a hard error, if we can infer at compile-time that the target is non-contiguous? >>> >>> Problem is, we cannot infer this from the tests done. >>> We would also have

Re: [patch, fortran] Warn about suspicious assignment to contiguous pointers

2017-08-29 Thread Thomas Koenig
Hi Janus, I think an unconditional warning is OK in this case because - Assigning to a pointer from an obvious non-contiguous target is not useful at all, that I can see I guess you're talking about a *contiguous* pointer here, Correct. and in that case I would argue that, beyond

Re: [patch, fortran] Warn about suspicious assignment to contiguous pointers

2017-08-28 Thread Janus Weil
Hi Thomas, >>> I think an unconditional warning is OK >>> in this case because >>> >>> - Assigning to a pointer from an obvious non-contiguous target >>>is not useful at all, that I can see >> >> >> I guess you're talking about a *contiguous* pointer here, > > Correct. > >> and in that >>

Re: [patch, fortran] Warn about suspicious assignment to contiguous pointers

2017-08-28 Thread Thomas Koenig
Hi Janus, I think an unconditional warning is OK in this case because - Assigning to a pointer from an obvious non-contiguous target is not useful at all, that I can see I guess you're talking about a *contiguous* pointer here, Correct. and in that case I would argue that, beyond

Re: [patch, fortran] Warn about suspicious assignment to contiguous pointers

2017-08-27 Thread Janus Weil
Hi Thomas, > the attached patch warns about the dubious pointer assignments (see > test case for details). thanks for the patch! Sounds like a useful diagnostic. > I think an unconditional warning is OK > in this case because > > - Assigning to a pointer from an obvious non-contiguous target >

[patch, fortran] Warn about suspicious assignment to contiguous pointers

2017-08-27 Thread Thomas Koenig
Hello world, the attached patch warns about the dubious pointer assignments (see test case for details). I think an unconditional warning is OK in this case because - Assigning to a pointer from an obvious non-contiguous target is not useful at all, that I can see - Some language laywer