[Bug fortran/34740] -fbounds-check with TRANSFER misses out of bounds in array assignment

2019-01-20 Thread juergen.reuter at desy dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34740

Jürgen Reuter  changed:

   What|Removed |Added

 CC||juergen.reuter at desy dot de

--- Comment #2 from Jürgen Reuter  ---
Still not caught in trunk. nagfor and ifort do catch this one.

[Bug fortran/34740] -fbounds-check with TRANSFER misses out of bounds in array assignment

2013-11-27 Thread Joost.VandeVondele at mat dot ethz.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34740

Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch changed:

   What|Removed |Added

   Last reconfirmed|2009-03-29 08:22:06 |2013-11-27
 CC||Joost.VandeVondele at mat dot 
ethz
   ||.ch

--- Comment #1 from Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch 
---
right... tripped over this in CP2K. Is found by g95.

I notice that the code:

SUBROUTINE S1()
   INTEGER, ALLOCATABLE, DIMENSION(:) :: a
   CHARACTER, ALLOCATABLE, DIMENSION(:) :: b
   ALLOCATE(a(20),b(20))
   write(6,*) SIZE(a),SIZE(b)
   a=TRANSFER(b,a)
   write(6,*) SIZE(a),SIZE(b)
END SUBROUTINE
CALL S1()
END

already does the right reallocation of a, so I'd guess some of the base work
has been done to produce a runtime error with -fcheck=bounds on 

SUBROUTINE S1()
   INTEGER, POINTER, DIMENSION(:) :: a
   CHARACTER, POINTER, DIMENSION(:) :: b
   ALLOCATE(a(20),b(20))
   write(6,*) SIZE(a),SIZE(b)
   a=TRANSFER(b,a)
   write(6,*) SIZE(a),SIZE(b)
END SUBROUTINE
CALL S1()
END


[Bug fortran/34740] -fbounds-check with TRANSFER misses out of bounds in array assignment

2009-03-29 Thread fxcoudert at gcc dot gnu dot org


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|normal  |enhancement
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-03-29 08:22:06
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34740