https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64854
Dominique d'Humieres changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64854
--- Comment #7 from Lorenz Hüdepohl ---
> Use valgrind or -fsanitize=address to detect this kind of
> memory problems.
I can live with that, thanks for your comments!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64854
--- Comment #6 from Harald Anlauf ---
(In reply to Lorenz Hüdepohl from comment #4)
> > The right way to fix the problem is to fix the program
> > by using an appropriate programming style. Writing
> >
> > real:: a(n1:) ! not: real :
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64854
--- Comment #5 from Dominique d'Humieres ---
Note that the error is detected if the code is compiled with
-fsanitize=address. And IMO the right way to use the array in a 'contains' is
a(:) (for which -fcheck=bounds works).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64854
--- Comment #4 from Lorenz Hüdepohl ---
> The right way to fix the problem is to fix the program
> by using an appropriate programming style. Writing
>
> real:: a(n1:) ! not: real :: a(n1:n2)
>
> one gets the expected check
I realiz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64854
Harald Anlauf changed:
What|Removed |Added
CC||anlauf at gmx dot de
--- Comment #3 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64854
--- Comment #2 from Lorenz Hüdepohl ---
(Please remove the line "use m1" from my example, its a leftover from a
previous
version)
I'm not denying that there is a mistake in the example program. I just hoped
that -fcheck=bounds would save me fro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64854
Dominique d'Humieres changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Last reconfirmed|