re PR fortran/42650 (F90: DT function with in-line DT definition and RESULT is rejected)

2010-02-02  Tobias Burnus  <burnus@net-b.de>

        PR fortran/42650
        * parse.c (decode_specification_statement): Use sym->result not
        * sym.

2010-02-02  Tobias Burnus  <burnus@net-b.de>

        PR fortran/42650
        * gfortran.dg/func_result_5.f90: New test.

From-SVN: r156450
This commit is contained in:
Tobias Burnus 2010-02-02 15:27:24 +01:00 committed by Tobias Burnus
parent 96700ac0ba
commit ea2fbdb819
4 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-02-02 Tobias Burnus <burnus@net-b.de>
PR fortran/42650
* parse.c (decode_specification_statement): Use sym->result not sym.
2010-01-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/38324

View File

@ -110,7 +110,7 @@ decode_specification_statement (void)
match ("import", gfc_match_import, ST_IMPORT);
match ("use", gfc_match_use, ST_USE);
if (gfc_current_block ()->ts.type != BT_DERIVED)
if (gfc_current_block ()->result->ts.type != BT_DERIVED)
goto end_of_block;
match (NULL, gfc_match_st_function, ST_STATEMENT_FUNCTION);

View File

@ -1,3 +1,8 @@
2010-02-02 Tobias Burnus <burnus@net-b.de>
PR fortran/42650
* gfortran.dg/func_result_5.f90: New test.
2010-02-01 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline:

View File

@ -0,0 +1,14 @@
! { dg-do compile }
!
! PR fortran/42650
!
! Result type was not working
!
type(t) function func2() result(res)
type t
sequence
integer :: i = 5
end type t
res%i = 2
end function func2