diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-07-26 11:49:00 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-07-26 11:49:00 +0200 |
commit | 69c3654cc6596daad012afc093ed05b6756b0377 (patch) | |
tree | b74b389b6eb95e38ae8dfd0d215a3cb99608ffb8 /gcc/testsuite | |
parent | 2da068d5c04c748a27fa0694eb00bb385bac13aa (diff) | |
download | gcc-69c3654cc6596daad012afc093ed05b6756b0377.zip gcc-69c3654cc6596daad012afc093ed05b6756b0377.tar.gz gcc-69c3654cc6596daad012afc093ed05b6756b0377.tar.bz2 |
check.c (gfc_check_sizeof): Permit for assumed type if and only if it has an array descriptor.
2014-07-26 Tobias Burnus <burnus@net-b.de>
* check.c (gfc_check_sizeof): Permit for assumed type if and
only if it has an array descriptor.
* intrinsic.c (do_ts29113_check): Permit SIZEOF.
(add_functions): SIZEOF is an Inquiry function.
* intrinsic.texi (SIZEOF): Add note that only contiguous
arrays are permitted.
* trans-expr.c (gfc_conv_intrinsic_to_class): Handle assumed
rank.
* trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle
assumed type + array descriptor, CLASS and assumed rank.
(gfc_conv_intrinsic_storage_size): Handle class arrays.
2014-07-26 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/sizeof_2.f90: Change dg-error.
* gfortran.dg/sizeof_4.f90: New.
* gfortran.dg/storage_size_1.f08: Correct expected
value.
From-SVN: r213079
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/sizeof_2.f90 | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/storage_size_1.f08 | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f63bd99..e007f31 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2014-07-26 Tobias Burnus <burnus@net-b.de> + + * gfortran.dg/sizeof_2.f90: Change dg-error. + * gfortran.dg/sizeof_4.f90: New. + * gfortran.dg/storage_size_1.f08: Correct expected + value. + 2014-07-26 Marc Glisse <marc.glisse@inria.fr> PR target/44551 diff --git a/gcc/testsuite/gfortran.dg/sizeof_2.f90 b/gcc/testsuite/gfortran.dg/sizeof_2.f90 index 5f19288..e6661a5 100644 --- a/gcc/testsuite/gfortran.dg/sizeof_2.f90 +++ b/gcc/testsuite/gfortran.dg/sizeof_2.f90 @@ -10,7 +10,7 @@ subroutine foo(x, y) integer(8) :: ii procedure() :: proc - ii = sizeof (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic sizeof" } + ii = sizeof (x) ! { dg-error "'x' argument of 'sizeof' intrinsic at \\(1\\) shall not be TYPE\\(\\*\\)" } ii = c_sizeof (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic c_sizeof" } ii = storage_size (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic storage_size" } diff --git a/gcc/testsuite/gfortran.dg/storage_size_1.f08 b/gcc/testsuite/gfortran.dg/storage_size_1.f08 index ade9dfc..71d3589 100644 --- a/gcc/testsuite/gfortran.dg/storage_size_1.f08 +++ b/gcc/testsuite/gfortran.dg/storage_size_1.f08 @@ -25,7 +25,7 @@ if (storage_size(a) /= 64) call abort() if (sizeof(b) /= 24) call abort() if (storage_size(b) /= 64) call abort() -if (sizeof(cp) /= 8) call abort() +if (sizeof(cp) /= 12) call abort() if (storage_size(cp) /= 96) call abort() end |