From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29518 invoked by alias); 23 Nov 2006 20:35:08 -0000 Received: (qmail 29432 invoked by uid 48); 23 Nov 2006 20:34:59 -0000 Date: Thu, 23 Nov 2006 20:35:00 -0000 Subject: [Bug fortran/29962] New: Initialization expressions checking in gfc_intrinsic_func_interface X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg02053.txt.bz2 We should only allow a) elemental functions b) we currently check gfc_init_expr_extensions(): /* FIXME: This should be moved into the intrinsic definitions. */ static const char * const init_expr_extensions[] = { "digits", "epsilon", "huge", "kind", "maxexponent", "minexponent", "precision", "present", "radix", "range", "selected_real_kind", "tiny", NULL }; I'm neither sure whether this is correct nor whether this is complete. See: "7.1.7 Initialization expression" in Fortran 2003 and "7.1.6.1 Constant expression" in Fortran 95. There is at least the following difference between the standards: F2003: [Allowed is] "A reference to an elemental standard intrinsic function, where each argument is an initialization expression" F95: "An initialization expression is a constant expression in which the exponentiation operation is permitted only with an integer power, and each primary is [...] (4) An elemental intrinsic function reference of type integer or character where each argument is an initialization expression of type integer or character" -- Summary: Initialization expressions checking in gfc_intrinsic_func_interface Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29962