https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116828
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is just user error, the program is invoking undefined behavior.
If you build with -fsanitize=undefined, it is even diagnosed at runtime:
/tmp/pr116828.f90:10:13: runtime error: signed integer overflow: 1073741824 * 2
cannot be represented in type 'integer(kind=4)'
0