re PR fortran/32867 (ICE on nested initialization expressions)
gcc/fortran: 2007-07-24 Daniel Franke <franke.daniel@gmail.com> PR fortran/32867 * expr.c (check_init_expr): Simplify matched functions. gcc/testsuite: 2007-07-24 Daniel Franke <franke.daniel@gmail.com> PR fortran/32867 * fortran.dg/initialization_10.f90: New test. From-SVN: r126882
This commit is contained in:
parent
3f2286f2a3
commit
fd8e2796db
@ -1,3 +1,8 @@
|
||||
2007-07-24 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR fortran/32867
|
||||
* expr.c (check_init_expr): Simplify matched functions.
|
||||
|
||||
2007-07-24 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR fortran/32778
|
||||
|
@ -2132,7 +2132,7 @@ check_init_expr (gfc_expr *e)
|
||||
}
|
||||
|
||||
if (m == MATCH_YES)
|
||||
t = SUCCESS;
|
||||
t = gfc_simplify_expr (e, 0);
|
||||
|
||||
break;
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-07-24 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR fortran/32867
|
||||
* fortran.dg/initialization_10.f90: New test.
|
||||
|
||||
2007-07-24 Daniel Franke <franke.daniel@gmail.com>
|
||||
|
||||
PR fortran/32778
|
||||
|
32
gcc/testsuite/gfortran.dg/initialization_10.f90
Normal file
32
gcc/testsuite/gfortran.dg/initialization_10.f90
Normal file
@ -0,0 +1,32 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR fortran/32867 - nested initialization expression not simplified
|
||||
!
|
||||
! Testcase contributed by H. J. Lu <hjl AT lucon DOT org>
|
||||
!
|
||||
|
||||
MODULE Readdata_mod
|
||||
IMPLICIT NONE
|
||||
Private
|
||||
Public Parser
|
||||
integer, parameter :: nkeywords = 2
|
||||
character(80), PARAMETER, dimension(1:nkeywords) :: keywords = &
|
||||
(/'PROBLEMSIZE ', &
|
||||
'NFTRANS_TD '/)
|
||||
|
||||
CONTAINS
|
||||
SUBROUTINE Parser(nx, ny, keyword)
|
||||
integer, intent(inout) :: nx, ny
|
||||
character(80), intent(inout) :: keyword
|
||||
|
||||
select case (keyword)
|
||||
case (trim(keywords(1))) ! PROBLEMSIZE
|
||||
nx = 1
|
||||
case (trim(keywords(2))) !'NFTRANS_TD'
|
||||
ny = 1
|
||||
end select
|
||||
|
||||
END SUBROUTINE Parser
|
||||
END MODULE Readdata_mod
|
||||
|
||||
! { dg-final { cleanup-modules "Readdata_mod" } }
|
Loading…
x
Reference in New Issue
Block a user