diff options
author | Tobias Burnus <burnus@net-b.de> | 2011-05-14 12:34:44 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2011-05-14 12:34:44 +0200 |
commit | e6242bc79e68c0eccb23912870dc3b30790b7bfc (patch) | |
tree | 0e5648b3f312aa5598b00b22dcc01130729add57 /gcc | |
parent | 4e4c4f4161242fa556ef872c5be3f21ade22b6f0 (diff) | |
download | gcc-e6242bc79e68c0eccb23912870dc3b30790b7bfc.zip gcc-e6242bc79e68c0eccb23912870dc3b30790b7bfc.tar.gz gcc-e6242bc79e68c0eccb23912870dc3b30790b7bfc.tar.bz2 |
re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])
2011-05-14 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
* interface.c (compare_parameter): Skip diagnostic if
actual argument is not an array; rank mismatch is diagnosted later.
2011-05-14 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
* gfortran.de/coarray_20.f90: New.
From-SVN: r173755
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/interface.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray_20.f90 | 15 |
4 files changed, 27 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e8daa47..029884b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -16,6 +16,12 @@ 2011-05-14 Tobias Burnus <burnus@net-b.de> + PR fortran/18918 + * interface.c (compare_parameter): Skip diagnostic if + actual argument is not an array; rank mismatch is diagnosted later. + +2011-05-14 Tobias Burnus <burnus@net-b.de> + * options.c (gfc_init_options, gfc_post_options): Enable -fstack-arrays by default if -Ofast is used. * invoke.texi (-fstack-arrays): Document this. diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 1f75724..732a0c59d 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1618,6 +1618,7 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, /* F2008, 12.5.2.8. */ if (formal->attr.dimension && (formal->attr.contiguous || formal->as->type != AS_ASSUMED_SHAPE) + && gfc_expr_attr (actual).dimension && !gfc_is_simply_contiguous (actual, true)) { if (where) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6cbf882..f014a80 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-05-14 Tobias Burnus <burnus@net-b.de> + + PR fortran/18918 + * gfortran.de/coarray_20.f90: New. + 2011-05-14 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/22572 diff --git a/gcc/testsuite/gfortran.dg/coarray_20.f90 b/gcc/testsuite/gfortran.dg/coarray_20.f90 new file mode 100644 index 0000000..8005768 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_20.f90 @@ -0,0 +1,15 @@ +! { dg-do compile } +! { dg-options "-fcoarray=single" } +! +! Before a bogus error (argument not simply contiguous) +! was printed instead of the rank mismatch +! +! PR fortran/18918 +! +integer :: A[*] +call bar(A) ! { dg-error "Rank mismatch in argument" } +contains + subroutine bar(x) + integer :: x(1)[*] + end subroutine bar +end |