diff options
author | kargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-19 21:09:21 +0000 |
---|---|---|
committer | kargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-19 21:09:21 +0000 |
commit | f2b5fae90118e1e38277387aa6c519716fd60c10 (patch) | |
tree | 93f141628a852376fd51de9a9ed520697a62622f | |
parent | 8587f7ea1c8d73512444c83fd26cca25de844160 (diff) | |
download | gcc-f2b5fae90118e1e38277387aa6c519716fd60c10.tar.gz |
2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68019
* decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
message to be issued.
2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68019
* gfortran.dg/pr68019.f90: new test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229003 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/decl.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr68019.f90 | 13 |
4 files changed, 24 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 53d309447b7..0b94ad70658 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org> + + PR fortran/68019 + * decl.c (add_init_expr_to_sym): Remove an assert() to allow an error + message to be issued. + 2015-10-18 Mikael Morin <mikael@gcc.gnu.org> PR fortran/67758 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 4871b7c364e..c7526772e80 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -1486,7 +1486,6 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus) " with scalar", &sym->declared_at); return false; } - gcc_assert (sym->as->rank == init->rank); /* Shape should be present, we get an initialization expression. */ gcc_assert (init->shape); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c4e96a7bc79..9130c7dadda 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org> + + PR fortran/68019 + * gfortran.dg/pr68019.f90: new test. + 2015-10-19 Richard Biener <rguenther@suse.de> PR tree-optimization/67975 diff --git a/gcc/testsuite/gfortran.dg/pr68019.f90 b/gcc/testsuite/gfortran.dg/pr68019.f90 new file mode 100644 index 00000000000..2e304c3a260 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr68019.f90 @@ -0,0 +1,13 @@ +! { dg-do compile } +! Original code from Gerhard Steinmetz +! Gerhard dot Steinmetz for fortran at t-online dot de +! PR fortran/68019 +! +program p + integer :: i + type t + integer :: n + end type + type(t), parameter :: vec(*) = [(t(i), i = 1, 4)] + type(t), parameter :: arr(*) = reshape(vec, [2, 2]) ! { dg-error "ranks 1 and 2 in assignment" } +end |