]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
utils.c (build_vms_descriptor32): Fix formatting.
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 9 Aug 2010 06:35:09 +0000 (06:35 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 9 Aug 2010 06:35:09 +0000 (06:35 +0000)
* gcc-interface/utils.c (build_vms_descriptor32): Fix formatting.
(build_vms_descriptor): Likewise.

From-SVN: r163027

gcc/ada/ChangeLog
gcc/ada/gcc-interface/utils.c

index cfedc5ef10a5c89c5498042a83ab2016b7605ff5..34248250db33e2c48c298c98578e67eda09c34f3 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-09  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/utils.c (build_vms_descriptor32): Fix formatting.
+       (build_vms_descriptor): Likewise.
+
 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
 
        * gcc-interface/utils.c (make_descriptor_field): Add tree parameter.
@@ -6,9 +11,8 @@
 
 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
 
-       * gcc-interface/decl.c (rec_variant).  Declare.  Declare a VEC of it.
-       (build_variant_list): Return a VEC instead of a tree.  Take a
-       VEC instead of a tree.
+       * gcc-interface/decl.c (rec_variant):  Declare.  Declare a VEC of it.
+       (build_variant_list): Take and return a VEC instead of a tree.
        (create_variant_part_from): Take a VEC instead of a tree for
        variant_list.  Adjust accordingly.
        (gnat_to_gnu_entity): Adjust for changes to previous functions.
index b74d1b67997856b40d818ae1b18669143e4f7e86..5edcbfeb9994dcb834342b71ab005006d2a0965d 100644 (file)
@@ -2427,30 +2427,29 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
 
   /* Make the type for a descriptor for VMS.  The first four fields are the
      same for all types.  */
-  field_list = 
-    make_descriptor_field ("LENGTH", gnat_type_for_size (16, 1),
-                          record_type,
-                          size_in_bytes
-                          ((mech == By_Descriptor_A
-                            || mech == By_Short_Descriptor_A)
-                           ? inner_type : type), field_list);
-  field_list =
-    make_descriptor_field ("DTYPE", gnat_type_for_size (8, 1),
-                          record_type, size_int (dtype), field_list);
-  field_list =
-    make_descriptor_field ("CLASS", gnat_type_for_size (8, 1),
-                          record_type, size_int (klass), field_list);
+  field_list
+    = make_descriptor_field ("LENGTH", gnat_type_for_size (16, 1), record_type,
+                            size_in_bytes ((mech == By_Descriptor_A
+                                            || mech == By_Short_Descriptor_A)
+                                           ? inner_type : type),
+                            field_list);
+  field_list
+    = make_descriptor_field ("DTYPE", gnat_type_for_size (8, 1), record_type,
+                            size_int (dtype), field_list);
+  field_list
+    = make_descriptor_field ("CLASS", gnat_type_for_size (8, 1), record_type,
+                            size_int (klass), field_list);
 
   /* Of course this will crash at run time if the address space is not
      within the low 32 bits, but there is nothing else we can do.  */
   pointer32_type = build_pointer_type_for_mode (type, SImode, false);
 
-  field_list =
-    make_descriptor_field ("POINTER", pointer32_type, record_type,
-                          build_unary_op (ADDR_EXPR,
-                                          pointer32_type,
-                                          build0 (PLACEHOLDER_EXPR,
-                                                  type)), field_list);
+  field_list
+    make_descriptor_field ("POINTER", pointer32_type, record_type,
+                            build_unary_op (ADDR_EXPR,
+                                            pointer32_type,
+                                            build0 (PLACEHOLDER_EXPR, type)),
+                            field_list);
 
   switch (mech)
     {
@@ -2462,52 +2461,57 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
 
     case By_Descriptor_SB:
     case By_Short_Descriptor_SB:
-      field_list =
-       make_descriptor_field ("SB_L1", gnat_type_for_size (32, 1),
-                              record_type,
-                              (TREE_CODE (type) == ARRAY_TYPE
-                               ? TYPE_MIN_VALUE (TYPE_DOMAIN (type))
-                               : size_zero_node), field_list);
-      field_list =
-       make_descriptor_field ("SB_U1", gnat_type_for_size (32, 1),
-                              record_type,
-                              (TREE_CODE (type) == ARRAY_TYPE
-                               ? TYPE_MAX_VALUE (TYPE_DOMAIN (type))
-                               : size_zero_node), field_list);
+      field_list
+       = make_descriptor_field ("SB_L1", gnat_type_for_size (32, 1),
+                                record_type,
+                                (TREE_CODE (type) == ARRAY_TYPE
+                                 ? TYPE_MIN_VALUE (TYPE_DOMAIN (type))
+                                 : size_zero_node),
+                                field_list);
+      field_list
+       = make_descriptor_field ("SB_U1", gnat_type_for_size (32, 1),
+                                record_type,
+                                (TREE_CODE (type) == ARRAY_TYPE
+                                 ? TYPE_MAX_VALUE (TYPE_DOMAIN (type))
+                                 : size_zero_node),
+                                field_list);
       break;
 
     case By_Descriptor_A:
     case By_Short_Descriptor_A:
     case By_Descriptor_NCA:
     case By_Short_Descriptor_NCA:
-      field_list =
-       make_descriptor_field ("SCALE", gnat_type_for_size (8, 1),
-                              record_type, size_zero_node, field_list);
-
-      field_list =
-       make_descriptor_field ("DIGITS", gnat_type_for_size (8, 1),
-                              record_type, size_zero_node, field_list);
-
-
-      field_list =
-       make_descriptor_field ("AFLAGS", gnat_type_for_size (8, 1),
-                              record_type,
-                              size_int ((mech == By_Descriptor_NCA ||
-                                         mech == By_Short_Descriptor_NCA)
-                                        ? 0
-                                        /* Set FL_COLUMN, FL_COEFF, and
-                                           FL_BOUNDS.  */
-                                        : (TREE_CODE (type) == ARRAY_TYPE
-                                           && TYPE_CONVENTION_FORTRAN_P (type)
-                                           ? 224 : 192)), field_list);
-
-      field_list =
-       make_descriptor_field ("DIMCT", gnat_type_for_size (8, 1),
-                              record_type, size_int (ndim), field_list);
-
-      field_list =
-       make_descriptor_field ("ARSIZE", gnat_type_for_size (32, 1),
-                              record_type, size_in_bytes (type), field_list);
+      field_list
+       = make_descriptor_field ("SCALE", gnat_type_for_size (8, 1),
+                                record_type, size_zero_node, field_list);
+
+      field_list
+       = make_descriptor_field ("DIGITS", gnat_type_for_size (8, 1),
+                                record_type, size_zero_node, field_list);
+
+
+      field_list
+       = make_descriptor_field ("AFLAGS", gnat_type_for_size (8, 1),
+                                record_type,
+                                size_int ((mech == By_Descriptor_NCA
+                                           || mech == By_Short_Descriptor_NCA)
+                                          ? 0
+                                          /* Set FL_COLUMN, FL_COEFF, and
+                                             FL_BOUNDS.  */
+                                          : (TREE_CODE (type) == ARRAY_TYPE
+                                             && TYPE_CONVENTION_FORTRAN_P
+                                                (type)
+                                            ? 224 : 192)),
+                                field_list);
+
+      field_list
+       = make_descriptor_field ("DIMCT", gnat_type_for_size (8, 1),
+                                record_type, size_int (ndim), field_list);
+
+      field_list
+       = make_descriptor_field ("ARSIZE", gnat_type_for_size (32, 1),
+                                record_type, size_in_bytes (type),
+                                field_list);
 
       /* Now build a pointer to the 0,0,0... element.  */
       tem = build0 (PLACEHOLDER_EXPR, type);
@@ -2517,10 +2521,10 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
                      convert (TYPE_DOMAIN (inner_type), size_zero_node),
                      NULL_TREE, NULL_TREE);
 
-      field_list =
-       make_descriptor_field ("A0", pointer32_type, record_type,
-                              build1 (ADDR_EXPR, pointer32_type, tem),
-                              field_list);
+      field_list
+       make_descriptor_field ("A0", pointer32_type, record_type,
+                                build1 (ADDR_EXPR, pointer32_type, tem),
+                                field_list);
 
       /* Next come the addressing coefficients.  */
       tem = size_one_node;
@@ -2538,9 +2542,9 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
          fname[0] = ((mech == By_Descriptor_NCA ||
                        mech == By_Short_Descriptor_NCA) ? 'S' : 'M');
          fname[1] = '0' + i, fname[2] = 0;
-         field_list =
-           make_descriptor_field (fname, gnat_type_for_size (32, 1),
-                                  record_type, idx_length, field_list);
+         field_list
+           make_descriptor_field (fname, gnat_type_for_size (32, 1),
+                                    record_type, idx_length, field_list);
 
          if (mech == By_Descriptor_NCA || mech == By_Short_Descriptor_NCA)
            tem = idx_length;
@@ -2552,16 +2556,16 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
          char fname[3];
 
          fname[0] = 'L', fname[1] = '0' + i, fname[2] = 0;
-         field_list =
-           make_descriptor_field (fname, gnat_type_for_size (32, 1),
-                                  record_type, TYPE_MIN_VALUE (idx_arr[i]),
-                                  field_list);
+         field_list
+           make_descriptor_field (fname, gnat_type_for_size (32, 1),
+                                    record_type, TYPE_MIN_VALUE (idx_arr[i]),
+                                    field_list);
 
          fname[0] = 'U';
-         field_list =
-           make_descriptor_field (fname, gnat_type_for_size (32, 1),
-                                  record_type, TYPE_MAX_VALUE (idx_arr[i]),
-                                  field_list);
+         field_list
+           make_descriptor_field (fname, gnat_type_for_size (32, 1),
+                                    record_type, TYPE_MAX_VALUE (idx_arr[i]),
+                                    field_list);
        }
       break;
 
@@ -2731,15 +2735,16 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
     = make_descriptor_field ("LENGTH", gnat_type_for_size (64, 1),
                             record64_type,
                             size_in_bytes (mech == By_Descriptor_A
-                                           ? inner_type : type), field_list64);
+                                           ? inner_type : type),
+                            field_list64);
 
   pointer64_type = build_pointer_type_for_mode (type, DImode, false);
 
   field_list64
     = make_descriptor_field ("POINTER", pointer64_type, record64_type,
                             build_unary_op (ADDR_EXPR, pointer64_type,
-                                            build0 (PLACEHOLDER_EXPR,
-                                                    type)), field_list64);
+                                            build0 (PLACEHOLDER_EXPR, type)),
+                            field_list64);
 
   switch (mech)
     {
@@ -2753,13 +2758,15 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity)
                                 record64_type,
                                 (TREE_CODE (type) == ARRAY_TYPE
                                  ? TYPE_MIN_VALUE (TYPE_DOMAIN (type))
-                                 : size_zero_node), field_list64);
+                                 : size_zero_node),
+                                field_list64);
       field_list64
        = make_descriptor_field ("SB_U1", gnat_type_for_size (64, 1),
                                 record64_type,
                                 (TREE_CODE (type) == ARRAY_TYPE
                                  ? TYPE_MAX_VALUE (TYPE_DOMAIN (type))
-                                 : size_zero_node), field_list64);
+                                 : size_zero_node),
+                                field_list64);
       break;
 
     case By_Descriptor_A: