re PR fortran/86281 (SEGV in fortran/resolve.c:resolve_function)

2018-06-22  Paul Thomas  <pault@gcc.gnu.org>
	    Rainer Orth  <ro@gcc.gnu.org>

	PR fortran/86281
	* resolve.c (resolve_contained_fntype): Check for the charlen
	before testing the length.

2018-06-22  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/86281
	* gfortran.dg/assumed_charlen_function_7.f90: Add -std=legacy.


Co-Authored-By: Rainer Orth <ro@gcc.gnu.org>

From-SVN: r261975
This commit is contained in:
Paul Thomas 2018-06-22 22:31:17 +00:00
parent 9395b1d99f
commit 474f253087
4 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2018-06-22 Paul Thomas <pault@gcc.gnu.org>
Rainer Orth <ro@gcc.gnu.org>
PR fortran/86281
* resolve.c (resolve_contained_fntype): Check for the charlen
before testing the length.
2018-06-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/49630

View file

@ -3116,6 +3116,7 @@ resolve_function (gfc_expr *expr)
/* If this is a deferred TBP with an abstract interface, its result
cannot be an assumed length character (F2003: C418). */
if (sym && sym->attr.abstract && sym->attr.function
&& sym->result->ts.u.cl
&& sym->result->ts.u.cl->length == NULL)
{
gfc_error ("ABSTRACT INTERFACE %qs at %L must not have an assumed "

View file

@ -1,3 +1,8 @@
2018-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/86281
* gfortran.dg/assumed_charlen_function_7.f90: Add -std=legacy.
2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
* gcc.target/powerpc/builtins-3-p8.c (test_pack_float): Remove

View file

@ -1,4 +1,5 @@
! { dg-do compile }
! { dg-options "-std=legacy" }
!
! Test the fix for PR49630, comment #11.
!