GCC with patches for OS216
リビジョン | f11600c98517d58c0f62df8e78f7090524f2d61b (tree) |
---|---|
日時 | 2018-03-21 10:07:43 |
作者 | Steven G. Kargl <kargl@gcc....> |
コミッター | Steven G. Kargl |
re PR fortran/85001 (ICE in gfc_build_array_type, at fortran/trans-types.c:1420)
2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85001
* interface.c (symbol_rank): Remove bogus null pointer check that
crept in when translating a ternary operator into an if-else
constructor.
2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85001
* gfortran.dg/interface_41.f90: New test.
From-SVN: r258698
@@ -1,3 +1,10 @@ | ||
1 | +2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org> | |
2 | + | |
3 | + PR fortran/85001 | |
4 | + * interface.c (symbol_rank): Remove bogus null pointer check that | |
5 | + crept in when translating a ternary operator into an if-else | |
6 | + constructor. | |
7 | + | |
1 | 8 | 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org> |
2 | 9 | |
3 | 10 | PR fortran/84931 |
@@ -1268,7 +1268,7 @@ symbol_rank (gfc_symbol *sym) | ||
1268 | 1268 | { |
1269 | 1269 | gfc_array_spec *as = NULL; |
1270 | 1270 | |
1271 | - if (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->as) | |
1271 | + if (sym->ts.type == BT_CLASS && CLASS_DATA (sym)) | |
1272 | 1272 | as = CLASS_DATA (sym)->as; |
1273 | 1273 | else |
1274 | 1274 | as = sym->as; |
@@ -1,3 +1,8 @@ | ||
1 | +2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org> | |
2 | + | |
3 | + PR fortran/85001 | |
4 | + * gfortran.dg/interface_41.f90: New test. | |
5 | + | |
1 | 6 | 2018-03-20 Jakub Jelinek <jakub@redhat.com> |
2 | 7 | |
3 | 8 | PR debug/84875 |
@@ -0,0 +1,19 @@ | ||
1 | +! { dg-do compile } | |
2 | +! PR fortran/85001 | |
3 | +! Contributed by Gerhard Steinmetz. | |
4 | +program p | |
5 | + type t | |
6 | + end type | |
7 | + call s | |
8 | +contains | |
9 | + real function f(x) | |
10 | + class(t) :: x | |
11 | + dimension :: x(:) | |
12 | + f = 1.0 | |
13 | + end | |
14 | + subroutine s | |
15 | + type(t) :: x(2) | |
16 | + real :: z | |
17 | + z = f(x) ! { dg-error "Rank mismatch in argument" } | |
18 | + end | |
19 | +end |