2006-12-04 Tobias Burnus <burnus@net-b.de>
PR fortran/29962
* expr.c (check_intrinsic_op): Allow noninteger exponents for F2003.
testsuite/
2006-12-04 Tobias Burnus <burnus@net-b.de>
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
+2006-12-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/29962
+ * expr.c (check_intrinsic_op): Allow noninteger exponents for F2003.
+
2006-12-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29821
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;
+2006-12-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/29962
+ * initialization_4.f90: Test noninteger exponents (-std=f95).
+ * initialization_5.f90: New test for noninteger exponents
+ with -std=f2003.
+
2006-12-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29821
! { dg-do compile }
! { dg-options "-std=f95" }
real, parameter :: pi = 4.0*Atan(1.0) ! { dg-error "Evaluation of nonstandard initialization expression" }
+real, parameter :: three = 27.0**(1.0/3.0) ! { dg-error "Noninteger exponent in an initialization expression" }
end
--- /dev/null
+! initialization expression, now allowed in Fortran 2003
+! PR fortran/29962
+! { dg-do run }
+! { dg-options "-std=f2003 -fall-intrinsics" }
+ real, parameter :: three = 27.0**(1.0/3.0)
+ if(abs(three-3.0)>epsilon(three)) call abort()
+end