mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 13:51:00 +08:00
re PR fortran/29393 (Vector subscript rejected)
fortran/ 2006-10-24 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/29393 * expr.c (simplify_parameter_variable): Keep rank of original expression. Testsuite/ 2006-10-24 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/29393 * gfortran.dg/initialize_2.f90: New. From-SVN: r118008
This commit is contained in:
parent
6d4d216add
commit
b9703d9852
@ -1,3 +1,9 @@
|
||||
2006-10-24 Erik Edelmann <eedelman@gcc.gnu.org>
|
||||
|
||||
PR fortran/29393
|
||||
* expr.c (simplify_parameter_variable): Keep rank of original
|
||||
expression.
|
||||
|
||||
2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
|
||||
|
||||
* Make-lang.in (f951$(exeext)): Depend on and link with attribs.o.
|
||||
|
@ -1363,6 +1363,8 @@ simplify_parameter_variable (gfc_expr * p, int type)
|
||||
if (e == NULL)
|
||||
return FAILURE;
|
||||
|
||||
e->rank = p->rank;
|
||||
|
||||
/* Do not copy subobject refs for constant. */
|
||||
if (e->expr_type != EXPR_CONSTANT && p->ref != NULL)
|
||||
e->ref = copy_ref (p->ref);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-10-24 Erik Edelmann <eedelman@gcc.gnu.org>
|
||||
|
||||
PR fortran/29393
|
||||
* gfortran.dg/initialize_2.f90: New.
|
||||
|
||||
2006-10-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* gcc.dg/torture/builtin-math-2.c: New test.
|
||||
|
7
gcc/testsuite/gfortran.dg/initialization_2.f90
Normal file
7
gcc/testsuite/gfortran.dg/initialization_2.f90
Normal file
@ -0,0 +1,7 @@
|
||||
! { dg-do compile }
|
||||
! PR 29393: Ranks of PARAMETER-lhs in initializations
|
||||
integer, parameter :: A(-3:7,2)=0
|
||||
integer, parameter, dimension(3) :: V = (/ 2, 4, 6 /)
|
||||
integer, parameter, dimension(3) :: B = A(V,1)
|
||||
integer, parameter, dimension(3) :: C = A(0:2,1)
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user