[Bug fortran/55341] address-sanitizer and Fortran
Joost.VandeVondele at mat dot ethz.ch
gcc-bugzilla@gcc.gnu.org
Thu Nov 15 14:03:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55341
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Joost.VandeVondele at mat
| |dot ethz.ch
--- Comment #1 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-11-15 14:02:47 UTC ---
Trying -faddress-sanitizer on CP2K leads to the following failure:
> cat bug.f90
MODULE qs_environment_types
TYPE rt_prop_type
INTEGER,DIMENSION(:,:),ALLOCATABLE :: orders
END TYPE rt_prop_type
TYPE qs_environment_type
TYPE(rt_prop_type),POINTER :: rtp
END TYPE qs_environment_type
CONTAINS
SUBROUTINE set_qs_env(qs_env,rtp)
TYPE(qs_environment_type), POINTER :: qs_env
TYPE(rt_prop_type), OPTIONAL, POINTER :: rtp
IF (PRESENT(rtp)) qs_env%rtp=rtp
END SUBROUTINE set_qs_env
END MODULE qs_environment_types
> gfortran -O0 -faddress-sanitizer bug.f90
bug.f90: In function ‘set_qs_env’:
bug.f90:9:0: error: type mismatch in binary expression
SUBROUTINE set_qs_env(qs_env,rtp)
^
unsigned long
integer(kind=8)
unsigned long
_182 = _181 - 1;
bug.f90:9:0: error: type mismatch in binary expression
unsigned long
integer(kind=8)
unsigned long
_206 = _205 - 1;
bug.f90:9:0: internal compiler error: verify_gimple failed
0x9a47ac verify_gimple_in_cfg(function*)
../../gcc/gcc/tree-cfg.c:4728
0x8dad97 execute_function_todo
../../gcc/gcc/passes.c:1979
0x8db75d execute_todo
../../gcc/gcc/passes.c:2008
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
More information about the Gcc-bugs
mailing list