http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46182
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-10-26 14:06:55 UTC --- Forwarded from http://gcc.gnu.org/ml/gcc-bugs/2010-10/msg02167.html > > It would be nice to have a run time check for such invalid use of > > unallocated allocatable variables (such as -fcheck=use_unalloc). > If you use an unallocated variable you get a segmentation fault. > Isn't this a sufficient runtime check ? Well! You can say the same thing for -fcheck=bounds if writing outside array bounds gives you a segmentation fault! Nevertheless nobody will argue that this check is useless: it can save you hours of debugging to locate the line(s) in which you do it. Segmentation faults tell you that there is something wrong, but not why and/or where (not counting gfortran bugs). It took me some time to understand it for a less than 20 line code in which I had the bad idea of using a copy and paste from a valid line to an invalid one (this can happen to anybody with kloc!-)