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
This commit is contained in:
parent
fb0a0e1591
commit
f5fd0cf12d
4 changed files with 18 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -1981,11 +1981,7 @@ check_inquiry (gfc_expr *e, int not_restricted)
|
|||
break;
|
||||
|
||||
if (functions[i] == NULL)
|
||||
{
|
||||
gfc_error ("Inquiry function '%s' at %L is not permitted "
|
||||
"in an initialization expression", name, &e->where);
|
||||
return MATCH_ERROR;
|
||||
}
|
||||
return MATCH_ERROR;
|
||||
|
||||
/* 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
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
|
||||
PR middle-end/34030
|
||||
|
|
7
gcc/testsuite/gfortran.dg/initialization_15.f90
Normal file
7
gcc/testsuite/gfortran.dg/initialization_15.f90
Normal file
|
@ -0,0 +1,7 @@
|
|||
! { 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
|
Loading…
Add table
Reference in a new issue