]> gcc.gnu.org Git - gcc.git/commitdiff
re PR fortran/40588 (Small bug in match_charkind_name)
authorTobias Burnus <burnus@net-b.de>
Mon, 13 Jul 2009 06:26:38 +0000 (08:26 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Mon, 13 Jul 2009 06:26:38 +0000 (08:26 +0200)
2009-07-12  Tobias Burnus  <burnus@net-b.de>
            Philippe Marguinaud <philippe.marguinaud@meteo.fr>

        PR fortran/40588
        * primary.c (match_charkind_name): Fix condition for $ matching.

        PR libfortran/22423
        * libgfortran.h: Typedef the GFC_DTYPE_* enum.

2009-07-12  Tobias Burnus  <burnus@net-b.de>

        PR libfortran/22423
        * io/io.h (namelist_type): Use the proper enum for GFC_DTYPE_*.
        * intrinsics/iso_c_binding.c (c_f_pointer_u0): Make sure
        variable is initialized to silence warning.

Co-Authored-By: Philippe Marguinaud <philippe.marguinaud@meteo.fr>
From-SVN: r149545

gcc/fortran/ChangeLog
gcc/fortran/libgfortran.h
gcc/fortran/primary.c
libgfortran/ChangeLog
libgfortran/intrinsics/iso_c_binding.c
libgfortran/io/io.h

index ec4502fc0f4ab673662505569ac8cbf57058d0fd..220693141b9d2b1dc0a3c4e1e0daeb74004b776b 100644 (file)
@@ -1,3 +1,12 @@
+2009-07-12  Tobias Burnus  <burnus@net-b.de>
+           Philippe Marguinaud <philippe.marguinaud@meteo.fr>
+
+       PR fortran/40588
+       * primary.c (match_charkind_name): Fix condition for $ matching.
+
+       PR libfortran/22423
+       * libgfortran.h: Typedef the GFC_DTYPE_* enum.
+
 2009-07-11  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/33197
index a18fdce2e8814883e94d59c53ebc532884eac980..d66020717a47500a9b268a1f2b28e2bcef8c6590 100644 (file)
@@ -110,7 +110,7 @@ libgfortran_error_codes;
 #define GFC_DTYPE_TYPE_MASK 0x38
 #define GFC_DTYPE_SIZE_SHIFT 6
 
-enum
+typedef enum
 {
   GFC_DTYPE_UNKNOWN = 0,
   GFC_DTYPE_INTEGER,
@@ -120,5 +120,6 @@ enum
   GFC_DTYPE_COMPLEX,
   GFC_DTYPE_DERIVED,
   GFC_DTYPE_CHARACTER
-};
+}
+dtype;
 
index 8013cc86d1e10aa75e539472b4334fe9b38c9162..0d52c6c0940c72225ec738699a05d29c64d00f4d 100644 (file)
@@ -832,7 +832,7 @@ match_charkind_name (char *name)
 
       if (!ISALNUM (c)
          && c != '_'
-         && (gfc_option.flag_dollar_ok && c != '$'))
+         && (c != '$' || !gfc_option.flag_dollar_ok))
        break;
 
       *name++ = c;
index 6ffd83d40ec3d0c833020c99e1b7e7d92551ac14..932c85efd7c122a99682cd3a667406f61e9d73d2 100644 (file)
@@ -1,8 +1,15 @@
+2009-07-12  Tobias Burnus  <burnus@net-b.de>
+
+       PR libfortran/22423
+       * io/io.h (namelist_type): Use the proper enum for GFC_DTYPE_*.
+       * intrinsics/iso_c_binding.c (c_f_pointer_u0): Make sure
+       variable is initialized to silence warning.
+
 2009-07-10  Steven G. Kargl  <kargl@gcc.gnu.org>
 
        * c99_functions.c (ccoshf, ccosh, ccoshl, ctanhf, ctanh, ctanl):
        Fix errant minus.
+
 2009-07-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libfortran/40330
index bb25e3e2d4f975ec8d31d60a36dfaf1aaae18beb..0dd7449df6d5ec14427c96a330968f216110db81 100644 (file)
@@ -113,26 +113,36 @@ ISO_C_BINDING_PREFIX (c_f_pointer_u0) (void *c_ptr_in,
 
           /* Have to allow for the SHAPE array to be any valid kind for
              an INTEGER type.  */
+         switch (size)
+           {
 #ifdef HAVE_GFC_INTEGER_1
-         if (size == 1)
-           ub = *((GFC_INTEGER_1 *) p);
+             case 1:
+               ub = *((GFC_INTEGER_1 *) p);
+               break;
 #endif
 #ifdef HAVE_GFC_INTEGER_2
-         if (size == 2)
-           ub = *((GFC_INTEGER_2 *) p);
+             case 2:
+               ub = *((GFC_INTEGER_2 *) p);
+               break;
 #endif
 #ifdef HAVE_GFC_INTEGER_4
-         if (size == 4)
-           ub = *((GFC_INTEGER_4 *) p);
+             case 4:
+               ub = *((GFC_INTEGER_4 *) p);
+               break;
 #endif
 #ifdef HAVE_GFC_INTEGER_8
-         if (size == 8)
-           ub = *((GFC_INTEGER_8 *) p);
+             case 8:
+               ub = *((GFC_INTEGER_8 *) p);
+               break;
 #endif
 #ifdef HAVE_GFC_INTEGER_16
-         if (size == 16)
-           ub = *((GFC_INTEGER_16 *) p);
+             case 16:
+               ub = *((GFC_INTEGER_16 *) p);
+               break;
 #endif
+             default:
+               internal_error (NULL, "c_f_pointer_u0: Invalid size");
+           }
          p += source_stride;
 
          if (i == 0)
index 088969a0fcae1e7b393bdb680d96c7a4bdd7f800..2a077629a6d2aff5a67280b2aa44f5eaaf85b253 100644 (file)
@@ -163,7 +163,7 @@ format_hash_entry;
 typedef struct namelist_type
 {
   /* Object type, stored as GFC_DTYPE_xxxx.  */
-  bt type;
+  dtype type;
 
   /* Object name.  */
   char * var_name;
This page took 0.076124 seconds and 5 git commands to generate.