Commit f5fd0cf1 by Francois-Xavier Coudert Committed by François-Xavier Coudert

re PR fortran/33957 (gfortran rejects valid initialization expression)

	PR fortran/33957

	* gfortran.dg/initialization_15.f90 : New test.

	* expr.c (check_inquiry): Don't call gfc_error now.

From-SVN: r130246
parent fb0a0e15
2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/33957
* expr.c (check_inquiry): Don't call gfc_error now.
2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/33739 PR fortran/33739
PR fortran/34084 PR fortran/34084
* scanner.c (start_source_file, end_source_file, * scanner.c (start_source_file, end_source_file,
......
...@@ -1981,11 +1981,7 @@ check_inquiry (gfc_expr *e, int not_restricted) ...@@ -1981,11 +1981,7 @@ check_inquiry (gfc_expr *e, int not_restricted)
break; break;
if (functions[i] == NULL) if (functions[i] == NULL)
{ return MATCH_ERROR;
gfc_error ("Inquiry function '%s' at %L is not permitted "
"in an initialization expression", name, &e->where);
return MATCH_ERROR;
}
/* At this point we have an inquiry function with a variable argument. The /* At this point we have an inquiry function with a variable argument. The
type of the variable might be undefined, but we need it now, because the type of the variable might be undefined, but we need it now, because the
......
2007-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/33957
* gfortran.dg/initialization_15.f90 : New test.
2007-11-16 Richard Guenther <rguenther@suse.de> 2007-11-16 Richard Guenther <rguenther@suse.de>
PR middle-end/34030 PR middle-end/34030
! { dg-do compile }
! Test by Dominique d'Humieres (PR 33957)
function bug(i) result(c)
integer, pointer :: i
character(len=merge(1,2, associated(i))) :: c
c = ""
end function bug
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