From e3da689054feeaf001f5f010ab5faaf7e432e2ef Mon Sep 17 00:00:00 2001 From: burnus Date: Mon, 4 Dec 2006 20:02:43 +0000 Subject: fortran/ 2006-12-04 Tobias Burnus PR fortran/29962 * expr.c (check_intrinsic_op): Allow noninteger exponents for F2003. testsuite/ 2006-12-04 Tobias Burnus PR fortran/29962 * initialization_4.f90: Test noninteger exponents (-std=f95). * initialization_5.f90: New test for noninteger exponents with -std=f2003 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119505 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/expr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gcc/fortran/expr.c') diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 16e89f85c26..f806497bc38 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -1622,9 +1622,11 @@ check_intrinsic_op (gfc_expr * e, try (*check_function) (gfc_expr *)) if (e->value.op.operator == INTRINSIC_POWER && check_function == check_init_expr && et0 (op2) != BT_INTEGER) { - gfc_error ("Exponent at %L must be INTEGER for an initialization " - "expression", &op2->where); - return FAILURE; + if (gfc_notify_std (GFC_STD_F2003,"Fortran 2003: Noninteger " + "exponent in an initialization " + "expression at %L", &op2->where) + == FAILURE) + return FAILURE; } break; -- cgit v1.2.3