2009-05-12 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 May 2009 22:42:45 +0000 (22:42 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 May 2009 22:42:45 +0000 (22:42 +0000)
        PR fortran/40110
        * decl.c (gfc_match_kind_spec): Turn C kind error into a
        * warning.

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

        PR fortran/40110
        * gfortran.dg/bind_c_usage_18.f90: Change dg-error into
        dg-warning.
        * gfortran.dg/c_kind_tests_2.f03: Ditto.
        * gfortran.dg/interop_params.f03: Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147452 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/bind_c_usage_18.f90
gcc/testsuite/gfortran.dg/c_kind_tests_2.f03
gcc/testsuite/gfortran.dg/interop_params.f03

index 7544345..2994acf 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-12  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/40110
+       * decl.c (gfc_match_kind_spec): Turn C kind error into a warning.
+
 2009-05-11  Steve Ellcey  <sje@cup.hp.com>
 
        * resolve.c (check_host_association): Initialize tail.
index f3ff0e6..7aa550e 100644 (file)
@@ -2000,9 +2000,9 @@ kind_expr:
   if (ts->f90_type != BT_UNKNOWN && ts->f90_type != ts->type
       && !((ts->f90_type == BT_REAL && ts->type == BT_COMPLEX)
           || (ts->f90_type == BT_COMPLEX && ts->type == BT_REAL)))
-    gfc_error_now ("C kind type parameter is for type %s but type at %L "
-                  "is %s", gfc_basic_typename (ts->f90_type), &where,
-                  gfc_basic_typename (ts->type));
+    gfc_warning_now ("C kind type parameter is for type %s but type at %L "
+                    "is %s", gfc_basic_typename (ts->f90_type), &where,
+                    gfc_basic_typename (ts->type));
 
   gfc_gobble_whitespace ();
   if ((c = gfc_next_ascii_char ()) != ')'
index 9e1a4a9..6d432cd 100644 (file)
@@ -1,3 +1,11 @@
+2009-05-12  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/40110
+       * gfortran.dg/bind_c_usage_18.f90: Change dg-error into dg-warning.
+       * gfortran.dg/c_kind_tests_2.f03: Ditto.
+       * gfortran.dg/interop_params.f03: Ditto.
+
+
 2009-05-12  Jan Hubicka  <jh@suse.cz>
 
        * gcc.dg/tree-ssa/loop-36.c: Reduce amount of iterations to 2 so unrolling
index 30534cc..2bce215 100644 (file)
@@ -7,7 +7,7 @@ subroutine foo(x,y,z,a) bind(c) ! { dg-warning "but may not be C interoperable"
   use iso_c_binding
   implicit none
   integer(4) :: x
-  integer(c_float) :: y ! { dg-error "C kind type parameter is for type REAL" }
+  integer(c_float) :: y ! { dg-warning "C kind type parameter is for type REAL" }
   complex(c_float) :: z ! OK, c_float == c_float_complex
   real(c_float_complex) :: a ! OK, c_float == c_float_complex
 end subroutine foo
@@ -16,8 +16,8 @@ use iso_c_binding
 implicit none
 integer, parameter :: it = c_int
 integer, parameter :: dt = c_double
-complex(c_int), target    :: z1  ! { dg-error "C kind type parameter is for type INTEGER" }
-complex(it), target       :: z2  ! { dg-error "C kind type parameter is for type INTEGER" }
+complex(c_int), target    :: z1  ! { dg-warning "C kind type parameter is for type INTEGER" }
+complex(it), target       :: z2  ! { dg-warning "C kind type parameter is for type INTEGER" }
 complex(c_double), target :: z3  ! OK
 complex(dt), target       :: z4  ! OK
 type(c_ptr) :: ptr
index ced31a5..aaaee97 100644 (file)
@@ -4,11 +4,11 @@ module c_kind_tests_2
 
   integer, parameter :: myF = c_float
   real(myF), bind(c) :: myCFloat
-  integer(myF), bind(c) :: myCInt       ! { dg-error "is for type REAL" }
-  integer(c_double), bind(c) :: myCInt2 ! { dg-error "is for type REAL" }
+  integer(myF), bind(c) :: myCInt       ! { dg-warning "is for type REAL" }
+  integer(c_double), bind(c) :: myCInt2 ! { dg-warning "is for type REAL" }
 
   integer, parameter :: myI = c_int
-  real(myI) :: myReal             ! { dg-error "is for type INTEGER" }
-  real(myI), bind(c) :: myCFloat2 ! { dg-error "is for type INTEGER" }
+  real(myI) :: myReal             ! { dg-warning "is for type INTEGER" }
+  real(myI), bind(c) :: myCFloat2 ! { dg-warning "is for type INTEGER" }
   real(4), bind(c) :: myFloat     ! { dg-warning "may not be a C interoperable" }
 end module c_kind_tests_2
index 96c7d5c..ea3dada 100644 (file)
@@ -14,7 +14,7 @@ contains
   end subroutine test_0
 
   subroutine test_1(my_f90_real) bind(c)
-    real(c_int), value :: my_f90_real    ! { dg-error "is for type INTEGER" }
+    real(c_int), value :: my_f90_real    ! { dg-warning "is for type INTEGER" }
   end subroutine test_1
 
   subroutine test_2(my_type) bind(c) ! { dg-error "is not C interoperable" }