Commit 1b3f07c7 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/52093 (Extra parenthesis with Size and Shape functions argument…

re PR fortran/52093 (Extra parenthesis with Size and Shape functions argument cause internal compiler error: Segmentation fault)

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

        PR fortran/52093
        * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.

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

        PR fortran/52093
        * gfortran.dg/shape_7.f90: New.

From-SVN: r183848
parent 1f01c3ec
2012-02-02 Tobias Burnus <burnus@net-b.de>
PR fortran/52093
* simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
2012-02-01 Thomas König <tkoenig@gcc.gnu.org> 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
PR fortran/51958 PR fortran/51958
......
...@@ -5541,6 +5541,7 @@ gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) ...@@ -5541,6 +5541,7 @@ gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind)
case INTRINSIC_NOT: case INTRINSIC_NOT:
case INTRINSIC_UPLUS: case INTRINSIC_UPLUS:
case INTRINSIC_UMINUS: case INTRINSIC_UMINUS:
case INTRINSIC_PARENTHESES:
replacement = array->value.op.op1; replacement = array->value.op.op1;
break; break;
......
2012-02-02 Tobias Burnus <burnus@net-b.de>
PR fortran/52093
* gfortran.dg/shape_7.f90: New.
2012-02-02 Richard Sandiford <rdsandiford@googlemail.com> 2012-02-02 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.target/mips/mips-prepend-1.c: New test. * gcc.target/mips/mips-prepend-1.c: New test.
......
! { dg-do compile }
! { dg-options "-fdump-tree-original" }
!
! PR fortran/52093
!
! Contributed by Mohammad Rahmani
!
Program Main
Implicit None
Integer:: X(2,2)
Integer:: X2(7:11,8:9)
if (size((X)) /= 4) call abort ()
if (any (Shape((X)) /= [2,2])) call abort ()
if (any (lbound((X)) /= [1,1])) call abort ()
if (any (ubound((X)) /= [2,2])) call abort ()
if (size(X2) /= 10) call abort ()
if (any (Shape(X2) /= [5,2])) call abort ()
if (any (lbound(X2) /= [7,8])) call abort ()
if (any (ubound(X2) /= [11,9])) call abort ()
if (size((X2)) /= 10) call abort ()
if (any (Shape((X2)) /= [5,2])) call abort ()
if (any (lbound((X2)) /= [1,1])) call abort ()
if (any (ubound((X2)) /= [5,2])) call abort ()
End Program Main
! { dg-final { scan-tree-dump-times "abort" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment