array.c (gfc_match_array_constructor): Disallow empty array constructor.
fortran/ 2005-06-03 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de> Erik Edelmann <erik.edelmann@iki.fi> * array.c (gfc_match_array_constructor): Disallow empty array constructor. testsuite/ 2005-06-04 Erik Edelmann <erik.edelmann@iki.fi> * gfortran.dg/array_constructor_3.f90: New test. From-SVN: r100579
This commit is contained in:
parent
9a28687dcf
commit
ab21e2722d
@ -1,3 +1,9 @@
|
||||
2005-06-03 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
Erik Edelmann <erik.edelmann@iki.fi>
|
||||
|
||||
* array.c (gfc_match_array_constructor): Disallow empty array
|
||||
constructor.
|
||||
|
||||
2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
|
||||
|
||||
* fortran/intrinsic.texi: Add documentation for
|
||||
|
@ -887,7 +887,10 @@ gfc_match_array_constructor (gfc_expr ** result)
|
||||
head = tail = NULL;
|
||||
|
||||
if (gfc_match (end_delim) == MATCH_YES)
|
||||
goto empty; /* Special case */
|
||||
{
|
||||
gfc_error ("Empty array constructor at %C is not allowed");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@ -911,7 +914,6 @@ gfc_match_array_constructor (gfc_expr ** result)
|
||||
if (gfc_match (end_delim) == MATCH_NO)
|
||||
goto syntax;
|
||||
|
||||
empty:
|
||||
expr = gfc_get_expr ();
|
||||
|
||||
expr->expr_type = EXPR_ARRAY;
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-06-04 Erik Edelmann <erik.edelmann@iki.fi>
|
||||
|
||||
* gfortran.dg/array_constructor_3.f90: New test.
|
||||
|
||||
2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
|
||||
* gfortran.dg/ret_pointer_1.f90: Un-XFAIL.
|
||||
|
5
gcc/testsuite/gfortran.dg/array_constructor_3.f90
Normal file
5
gcc/testsuite/gfortran.dg/array_constructor_3.f90
Normal file
@ -0,0 +1,5 @@
|
||||
! { dg-do compile }
|
||||
! Check that empty array constructors are rejected
|
||||
program hum
|
||||
print *, (//) { dg-error "Empty array constructor" }
|
||||
end program hum
|
Loading…
Reference in New Issue
Block a user