A specification expression is an expression with limitations that make it suitable for use in specifications such as length type parameters (C501) and array bounds (R512, R513). R729 specification-expr is scalar-int-expr C710 (R729) The scalar-int-expr shall be a restricted expression. A restricted expression is an expression in which each operation is intrinsic and each primary is ... (2) An object designator with a base object that is a dummy argument that has neither the OPTIONAL nor the INTENT(OUT) attribute, The attach patch enforces the above restriction. It has been built and regression tested on x86_64-*-freebsd. OK for trunk? 2010-09-02 Steven G. Kargl PR fortran/45495 * gfortran.dg/dummy_optional_arg.f90: New test. 2010-09-02 Steven G. Kargl PR fortran/45495 * fortran/expr.c (check_inquiry): Optional dummy argument are not permitted in a restricted expression. -- Steve