[Bug fortran/91039] LHS size to small to hold RHS but no error

urbanjost at comcast dot net gcc-bugzilla@gcc.gnu.org
Sun Jun 30 18:14:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91039

--- Comment #2 from urbanjost at comcast dot net ---
After posting this for comment on the Fortran newsgroup I realize this is not
technically a bug, but I would like it to remain as an enhancement request that
this type of bug be reported when "...-fbounds-check" is used on the compile.

urba...@comcast.net <urba...@comcast.net> schrieb: 
> I expect the following program to at a minimum fail at run time (and possibly during compile) where indicated. 

The program has a bug (as you know), but the error in quesion, a 
bounds violation, is not a constraint.  So, the compiler is free 
to diagrnose this or not. 

You could argue that it would be better if a compiler caught 
this, and I would agree, but it's not a compiler bug.


More information about the Gcc-bugs mailing list