re PR fortran/34915 (-std=f95 rejects len_trim() and index() in init expressions)
gcc/fortran: 2008-01-22 Daniel Franke <franke.daniel@gmail.com> PR fortran/34915 * expr.c (check_elemental): Fix check for valid data types. gcc/testsuite: 2008-01-22 Daniel Franke <franke.daniel@gmail.com> PR fortran/34915 * gfortran.dg/initialization_18.f90: New test. From-SVN: r131715
This commit is contained in:
parent
0387c1429d
commit
c29164019f
4 changed files with 22 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-01-22 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR fortran/34915
|
||||
* expr.c (check_elemental): Fix check for valid data types.
|
||||
|
||||
2008-01-22 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/34899
|
||||
|
|
|
@ -2109,7 +2109,8 @@ check_elemental (gfc_expr *e)
|
|||
|| !e->value.function.isym->elemental)
|
||||
return MATCH_NO;
|
||||
|
||||
if ((e->ts.type != BT_INTEGER || e->ts.type != BT_CHARACTER)
|
||||
if (e->ts.type != BT_INTEGER
|
||||
&& e->ts.type != BT_CHARACTER
|
||||
&& gfc_notify_std (GFC_STD_F2003, "Extension: Evaluation of "
|
||||
"nonstandard initialization expression at %L",
|
||||
&e->where) == FAILURE)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2008-01-22 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR fortran/34915
|
||||
* gfortran.dg/initialization_18.f90: New test.
|
||||
|
||||
2008-01-22 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/34899
|
||||
|
|
10
gcc/testsuite/gfortran.dg/initialization_18.f90
Normal file
10
gcc/testsuite/gfortran.dg/initialization_18.f90
Normal file
|
@ -0,0 +1,10 @@
|
|||
! { dg-do compile }
|
||||
! { dg-options "-std=f95 -Wall" }
|
||||
!
|
||||
! PR fortran/34915
|
||||
! Testcase contributed by Al Greynolds via comp.lang.fortran.
|
||||
!
|
||||
|
||||
character(*),dimension(3),parameter :: a=(/'a() ','b(,) ','c(,,)'/)
|
||||
integer,dimension(3),parameter :: l=len_trim(a)
|
||||
end
|
Loading…
Add table
Reference in a new issue