Commit 86daf6d5 by Steven G. Kargl

re PR fortran/50524 (*** glibc detected *** invalid free() pointer on illegal code (r178939))

2011-10-15  Steven G. Kargl  <kargl@gcc.gcu.org>
 
	PR fortran/50524
	* resolve.c (resolve_ref): Check return value of resolve_substring().

2011-10-15  Steven G. Kargl  <kargl@gcc.gcu.org>
 
	PR fortran/50524
	* gfortran.dg/substring_integer_index.f90: New test.

From-SVN: r180262
parent fc3c9491
2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org> 2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/50524
* resolve.c (resolve_ref): Check return value of resolve_substring().
2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
* io.c (match_dt_format): Match a user-defined operator or a kind * io.c (match_dt_format): Match a user-defined operator or a kind
type prefixed string. type prefixed string.
......
...@@ -4846,7 +4846,8 @@ resolve_ref (gfc_expr *expr) ...@@ -4846,7 +4846,8 @@ resolve_ref (gfc_expr *expr)
break; break;
case REF_SUBSTRING: case REF_SUBSTRING:
resolve_substring (ref); if (resolve_substring (ref) == FAILURE)
return FAILURE;
break; break;
} }
......
2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org> 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/50524
* gfortran.dg/substring_integer_index.f90: New test.
2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
* gfortran.dg/format_string.f: New test. * gfortran.dg/format_string.f: New test.
......
! { dg-do compile }
! PR fortran/50524
!
program foo
print *, 'abc'(2.e0:3) ! { dg-error "must be of type INTEGER" }
print *,'qwe'(1:1e0) ! { dg-error "must be of type INTEGER" }
end program foo
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment