From patchwork Sun Feb 4 19:49:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 869081 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-472585-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Y6+ubGHk"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zZLs122MSz9s75 for ; Mon, 5 Feb 2018 06:49:24 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=PeUtUjzbsZmOFIskpwstUmUWP/BNg8pcaAl1maiqGeTKFJils0 sx70cZwKfLscxEowEpeD0pEWeaEJ0IoMfLH2QLK/fxBslyOVMVJ5n1NGqE7TAa+s w4jrrDZOkNlg60xvW6YLeOs9HziquXTo1ukqIxEvZhbvU4OCg9i5UH/Kw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=eCXirPCi5N8gzPOUn5W3Xb9MEoU=; b=Y6+ubGHk9130501q2zKe hZFsFXVmV2sWvg0wlY5qBSmObM72aLufdakxdKd2Yj9Lcf9MrB8MLre2oTZkGaIv 5PYmSjAuoDN8VSOO7YfQ4JpdNYCB7cCq3YojKrtcZW1to7tQlTF19kO1/hNZJ4wB ZIWRKZq5X2hr3DzP4k9hc8A= Received: (qmail 103960 invoked by alias); 4 Feb 2018 19:49:15 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 103917 invoked by uid 89); 4 Feb 2018 19:49:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout3.netcologne.de Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 04 Feb 2018 19:49:09 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 7E7F012873; Sun, 4 Feb 2018 20:49:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id 6CD3511DB4; Sun, 4 Feb 2018 20:49:06 +0100 (CET) Received: from [78.35.149.249] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 5a7763b2-029d-7f0000012729-7f000001c0e0-1 for ; Sun, 04 Feb 2018 20:49:06 +0100 Received: from [192.168.178.20] (xdsl-78-35-149-249.netcologne.de [78.35.149.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Sun, 4 Feb 2018 20:49:04 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, libfortran] Use flexible array members for array descriptor Message-ID: Date: Sun, 4 Feb 2018 20:49:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Hello world, in the attached patch, I have used flexible array members for using the different descriptor types (following Richi's advice). This does not change the binary ABI, but the library code maches what we are actually doing in the front end. I have not yet given up hope of enabling LTO for the library :-) and this, I think, will be a prerequisite. OK for trunk? Regards Thomas 2018-02-04 Thomas Koenig * libgfortran.h (GFC_ARRAY_DESCRIPTOR): Remove dimension of descriptor to use vaiable members for dim. Change usage of GFC_ARRAY_DESCRIPTOR accordingly. (GFC_FILL_ARRAY_DESCRIPTOR): New macro. (gfc_full_array_i4): New type. * intrinsics/date_and_time.c (secnds): Use sizeof (gfc_full_array_i4) for memory allocation. * intrinsics/reshape_generic.c: Use GFC_FULL_ARRAY_DESCRIPTOR. * io/format.c: Use sizeof (gfc_full_array_i4) for memoy allocation. * io/list_read.c (list_formatted_read_scalar): Use gfc_full_array_i4 for variable. (nml_read_obj): Likewise. * io/write.c (list_formatted_write_scalar): Likewise. (nml_write_obj): Likewise. * m4/reshape.m4: Use GFC_FULL_ARRAY_DESCRIPTOR. * generated/reshape_c10.c: Regenerated. * generated/reshape_c16.c: Regenerated. * generated/reshape_c4.c: Regenerated. * generated/reshape_c8.c: Regenerated. * generated/reshape_i16.c: Regenerated. * generated/reshape_i4.c: Regenerated. * generated/reshape_i8.c: Regenerated. * generated/reshape_r10.c: Regenerated. * generated/reshape_r16.c: Regenerated. * generated/reshape_r4.c: Regenerated. * generated/reshape_r8.c: Regenerated. Index: libgfortran.h =================================================================== --- libgfortran.h (Revision 257347) +++ libgfortran.h (Arbeitskopie) @@ -339,51 +339,65 @@ typedef struct dtype_type } dtype_type; -#define GFC_ARRAY_DESCRIPTOR(r, type) \ +#define GFC_ARRAY_DESCRIPTOR(type) \ struct {\ type *base_addr;\ size_t offset;\ dtype_type dtype;\ index_type span;\ - descriptor_dimension dim[r];\ + descriptor_dimension dim[];\ } /* Commonly used array descriptor types. */ -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) gfc_array_void; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, char) gfc_array_char; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_1) gfc_array_i1; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_2) gfc_array_i2; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_4) gfc_array_i4; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_8) gfc_array_i8; +typedef GFC_ARRAY_DESCRIPTOR (void) gfc_array_void; +typedef GFC_ARRAY_DESCRIPTOR (char) gfc_array_char; +typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_1) gfc_array_i1; +typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_2) gfc_array_i2; +typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_4) gfc_array_i4; +typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_8) gfc_array_i8; #ifdef HAVE_GFC_INTEGER_16 -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_16) gfc_array_i16; +typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_16) gfc_array_i16; #endif -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_4) gfc_array_r4; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_8) gfc_array_r8; +typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_4) gfc_array_r4; +typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_8) gfc_array_r8; #ifdef HAVE_GFC_REAL_10 -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_10) gfc_array_r10; +typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_10) gfc_array_r10; #endif #ifdef HAVE_GFC_REAL_16 -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_16) gfc_array_r16; +typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_16) gfc_array_r16; #endif -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_4) gfc_array_c4; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_8) gfc_array_c8; +typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_4) gfc_array_c4; +typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_8) gfc_array_c8; #ifdef HAVE_GFC_COMPLEX_10 -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_10) gfc_array_c10; +typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_10) gfc_array_c10; #endif #ifdef HAVE_GFC_COMPLEX_16 -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_16) gfc_array_c16; +typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_16) gfc_array_c16; #endif -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_1) gfc_array_l1; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_2) gfc_array_l2; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_4) gfc_array_l4; -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_8) gfc_array_l8; +typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_1) gfc_array_l1; +typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_2) gfc_array_l2; +typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_4) gfc_array_l4; +typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_8) gfc_array_l8; #ifdef HAVE_GFC_LOGICAL_16 -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_16) gfc_array_l16; +typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_16) gfc_array_l16; #endif typedef gfc_array_i1 gfc_array_s1; typedef gfc_array_i4 gfc_array_s4; +/* These are for when you actually want to declare a descriptor, as + opposed to a pointer to it. */ + +#define GFC_FULL_ARRAY_DESCRIPTOR(r, type) \ +struct {\ + type *base_addr;\ + size_t offset;\ + dtype_type dtype;\ + index_type span;\ + descriptor_dimension dim[r];\ +} + +typedef GFC_FULL_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_4) gfc_full_array_i4; + #define GFC_DESCRIPTOR_RANK(desc) ((desc)->dtype.rank) #define GFC_DESCRIPTOR_TYPE(desc) ((desc)->dtype.type) #define GFC_DESCRIPTOR_SIZE(desc) ((desc)->dtype.elem_len) @@ -1345,7 +1359,7 @@ iexport_proto(random_seed_i8); /* size.c */ -typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) array_t; +typedef GFC_ARRAY_DESCRIPTOR (void) array_t; extern index_type size0 (const array_t * array); iexport_proto(size0); Index: intrinsics/date_and_time.c =================================================================== --- intrinsics/date_and_time.c (Revision 257347) +++ intrinsics/date_and_time.c (Arbeitskopie) @@ -268,7 +268,7 @@ secnds (GFC_REAL_4 *x) GFC_REAL_4 temp1, temp2; /* Make the INTEGER*4 array for passing to date_and_time. */ - gfc_array_i4 *avalues = xmalloc (sizeof (gfc_array_i4)); + gfc_array_i4 *avalues = xmalloc (sizeof (gfc_full_array_i4)); avalues->base_addr = &values[0]; GFC_DESCRIPTOR_DTYPE (avalues).type = BT_REAL; GFC_DESCRIPTOR_DTYPE (avalues).elem_len = 4; Index: intrinsics/reshape_generic.c =================================================================== --- intrinsics/reshape_generic.c (Revision 257347) +++ intrinsics/reshape_generic.c (Arbeitskopie) @@ -26,8 +26,8 @@ see the files COPYING3 and COPYING.RUNTIME respect #include "libgfortran.h" #include -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; -typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) parray; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) parray; static void reshape_internal (parray *ret, parray *source, shape_type *shape, Index: io/format.c =================================================================== --- io/format.c (Revision 257347) +++ io/format.c (Arbeitskopie) @@ -1025,7 +1025,7 @@ parse_format_list (st_parameter_dt *dtp, bool *see t = format_lex (fmt); /* Initialize the vlist to a zero size array. */ - tail->u.udf.vlist= xmalloc (sizeof(gfc_array_i4)); + tail->u.udf.vlist= xmalloc (sizeof(gfc_full_array_i4)); GFC_DESCRIPTOR_DATA(tail->u.udf.vlist) = NULL; GFC_DIMENSION_SET(tail->u.udf.vlist->dim[0],1, 0, 0); Index: io/list_read.c =================================================================== --- io/list_read.c (Revision 257347) +++ io/list_read.c (Arbeitskopie) @@ -2198,7 +2198,7 @@ list_formatted_read_scalar (st_parameter_dt *dtp, gfc_charlen_type child_iomsg_len; int noiostat; int *child_iostat = NULL; - gfc_array_i4 vlist; + gfc_full_array_i4 vlist; GFC_DESCRIPTOR_DATA(&vlist) = NULL; GFC_DIMENSION_SET(vlist.dim[0],1, 0, 0); @@ -2996,7 +2996,7 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info gfc_charlen_type child_iomsg_len; int noiostat; int *child_iostat = NULL; - gfc_array_i4 vlist; + gfc_full_array_i4 vlist; formatted_dtio dtio_ptr = (formatted_dtio)nl->dtio_sub; GFC_DESCRIPTOR_DATA(&vlist) = NULL; Index: io/write.c =================================================================== --- io/write.c (Revision 257347) +++ io/write.c (Arbeitskopie) @@ -1886,7 +1886,7 @@ list_formatted_write_scalar (st_parameter_dt *dtp, gfc_charlen_type child_iomsg_len; int noiostat; int *child_iostat = NULL; - gfc_array_i4 vlist; + gfc_full_array_i4 vlist; GFC_DESCRIPTOR_DATA(&vlist) = NULL; GFC_DIMENSION_SET(vlist.dim[0],1, 0, 0); @@ -2211,7 +2211,7 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info gfc_charlen_type child_iomsg_len; int noiostat; int *child_iostat = NULL; - gfc_array_i4 vlist; + gfc_full_array_i4 vlist; formatted_dtio dtio_ptr = (formatted_dtio)obj->dtio_sub; GFC_DIMENSION_SET(vlist.dim[0],1, 0, 0); Index: m4/reshape.m4 =================================================================== --- m4/reshape.m4 (Revision 257347) +++ m4/reshape.m4 (Arbeitskopie) @@ -29,7 +29,7 @@ include(iparm.m4)dnl `#if defined (HAVE_'rtype_name`) -typedef GFC_ARRAY_DESCRIPTOR(1, 'index_type`) 'shape_type`;' +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, 'index_type`) 'shape_type`;' dnl For integer routines, only the kind (ie size) is used to name the dnl function. The same function will be used for integer and logical Index: generated/reshape_c10.c =================================================================== --- generated/reshape_c10.c (Revision 257347) +++ generated/reshape_c10.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_COMPLEX_10) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_c10 (gfc_array_c10 * const restrict, Index: generated/reshape_c16.c =================================================================== --- generated/reshape_c16.c (Revision 257347) +++ generated/reshape_c16.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_COMPLEX_16) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_c16 (gfc_array_c16 * const restrict, Index: generated/reshape_c4.c =================================================================== --- generated/reshape_c4.c (Revision 257347) +++ generated/reshape_c4.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_COMPLEX_4) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_c4 (gfc_array_c4 * const restrict, Index: generated/reshape_c8.c =================================================================== --- generated/reshape_c8.c (Revision 257347) +++ generated/reshape_c8.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_COMPLEX_8) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_c8 (gfc_array_c8 * const restrict, Index: generated/reshape_i16.c =================================================================== --- generated/reshape_i16.c (Revision 257347) +++ generated/reshape_i16.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_INTEGER_16) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_16 (gfc_array_i16 * const restrict, Index: generated/reshape_i4.c =================================================================== --- generated/reshape_i4.c (Revision 257347) +++ generated/reshape_i4.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_INTEGER_4) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_4 (gfc_array_i4 * const restrict, Index: generated/reshape_i8.c =================================================================== --- generated/reshape_i8.c (Revision 257347) +++ generated/reshape_i8.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_INTEGER_8) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_8 (gfc_array_i8 * const restrict, Index: generated/reshape_r10.c =================================================================== --- generated/reshape_r10.c (Revision 257347) +++ generated/reshape_r10.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_REAL_10) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_r10 (gfc_array_r10 * const restrict, Index: generated/reshape_r16.c =================================================================== --- generated/reshape_r16.c (Revision 257347) +++ generated/reshape_r16.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_REAL_16) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_r16 (gfc_array_r16 * const restrict, Index: generated/reshape_r4.c =================================================================== --- generated/reshape_r4.c (Revision 257347) +++ generated/reshape_r4.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_REAL_4) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_r4 (gfc_array_r4 * const restrict, Index: generated/reshape_r8.c =================================================================== --- generated/reshape_r8.c (Revision 257347) +++ generated/reshape_r8.c (Arbeitskopie) @@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respect #if defined (HAVE_GFC_REAL_8) -typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; +typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type; extern void reshape_r8 (gfc_array_r8 * const restrict,