libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.

2008-05-16  Tobias Burnus  <burnus@net-b.de>

        * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
        * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.

2008-05-16  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/rank_1.f90
        * gfortran.dg/rank_2.f90

From-SVN: r135442
This commit is contained in:
Tobias Burnus 2008-05-16 23:05:08 +02:00 committed by Tobias Burnus
parent e864c0c313
commit a4cd1610ea
6 changed files with 34 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2008-05-16 Tobias Burnus <burnus@net-b.de>
* libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
* array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
2008-04-16 Daniel Kraft <d@domob.eu>
PR fortran/27997

View file

@ -437,6 +437,12 @@ gfc_match_array_spec (gfc_array_spec **asp)
goto cleanup;
}
if (as->rank > 7
&& gfc_notify_std (GFC_STD_F2008, "Fortran 2008: Array "
"specification at %C with more than 7 dimensions")
== FAILURE)
goto cleanup;
as->rank++;
}

View file

@ -88,7 +88,7 @@ libgfortran_error_codes;
#define GFC_STDERR_UNIT_NUMBER 0
#define GFC_MAX_DIMENSIONS 7
#define GFC_MAX_DIMENSIONS 15
#define GFC_DTYPE_RANK_MASK 0x07
#define GFC_DTYPE_TYPE_SHIFT 3

View file

@ -1,3 +1,8 @@
2008-05-16 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/rank_1.f90
* gfortran.dg/rank_2.f90
2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* gfortran.dg/missing_parens_1.f90: Update test.

View file

@ -0,0 +1,9 @@
! { dg-do compile }
! { dg-options "-std=f2008" }
!
! Fortran < 2008 allows 7 dimensions
! Fortran 2008 allows 15 dimensions (including co-array ranks)
!
integer :: a(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
integer :: b(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16) ! { dg-error "has more than 15 dimensions" }
end

View file

@ -0,0 +1,8 @@
! { dg-do compile }
! { dg-options "-std=f2003" }
!
! Fortran < 2008 allows 7 dimensions
! Fortran 2008 allows 15 dimensions (including co-array ranks)
!
integer :: a(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ! { dg-error "more than 7 dimensions" }
end