OSDN Git Service

2012-03-22 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Mar 2012 21:13:00 +0000 (21:13 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Mar 2012 21:13:00 +0000 (21:13 +0000)
        PR fortran/52452
        * resolve.c (resolve_intrinsic): Don't search for a
        function if we know that it is a subroutine.

2012-03-22  Tobias Burnus  <burnus@net-b.de>

        PR fortran/52452
        * gfortran.dg/intrinsic_8.f90: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@185713 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/intrinsic_8.f90 [new file with mode: 0644]

index 15f0f1d..816d424 100644 (file)
@@ -1,3 +1,9 @@
+2012-03-22  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/52452
+       * resolve.c (resolve_intrinsic): Don't search for a
+       function if we know that it is a subroutine.
+
 2012-03-22  Release Manager
 
        * GCC 4.7.0 released.
index 4dcf9b1..824bc25 100644 (file)
@@ -1496,7 +1496,7 @@ resolve_intrinsic (gfc_symbol *sym, locus *loc)
 
   if (sym->intmod_sym_id)
     isym = gfc_intrinsic_function_by_id ((gfc_isym_id) sym->intmod_sym_id);
-  else
+  else if (!sym->attr.subroutine)
     isym = gfc_find_function (sym->name);
 
   if (isym)
index 1de90a0..5b79773 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-22  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/52452
+       * gfortran.dg/intrinsic_8.f90: New.
+
 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/52671
 
        Backport from 2012-03-20 mainline r185570.
 
-        PR target/49868
-        * gcc.target/avr/torture/addr-space-2.h: New file.
-        * gcc.target/avr/torture/addr-space-2-g.h: New test.
-        * gcc.target/avr/torture/addr-space-2-0.h: New test.
-        * gcc.target/avr/torture/addr-space-2-1.h: New test.
-        * gcc.target/avr/torture/addr-space-2-x.h: New test.
+       PR target/49868
+       * gcc.target/avr/torture/addr-space-2.h: New file.
+       * gcc.target/avr/torture/addr-space-2-g.h: New test.
+       * gcc.target/avr/torture/addr-space-2-0.h: New test.
+       * gcc.target/avr/torture/addr-space-2-1.h: New test.
+       * gcc.target/avr/torture/addr-space-2-x.h: New test.
        
        Backport from 2012-03-12 mainline r185255.
 
-        PR target/49868
-        * gcc.target/avr/torture/addr-space-1.h: New file.
-        * gcc.target/avr/torture/addr-space-g.h: New test.
-        * gcc.target/avr/torture/addr-space-0.h: New test.
-        * gcc.target/avr/torture/addr-space-1.h: New test.
-        * gcc.target/avr/torture/addr-space-x.h: New test.
+       PR target/49868
+       * gcc.target/avr/torture/addr-space-1.h: New file.
+       * gcc.target/avr/torture/addr-space-g.h: New test.
+       * gcc.target/avr/torture/addr-space-0.h: New test.
+       * gcc.target/avr/torture/addr-space-1.h: New test.
+       * gcc.target/avr/torture/addr-space-x.h: New test.
 
 2012-03-22  Jakub Jelinek  <jakub@redhat.com>
 
@@ -41,7 +46,7 @@
        * g++.dg/cpp0x/udlit-args2.C: New test.
 
        2012-03-13  Jakub Jelinek  <jakub@redhat.com>
+
        PR c/52577
        * gcc.dg/Wunused-var-3.c: New test.
 
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_8.f90 b/gcc/testsuite/gfortran.dg/intrinsic_8.f90
new file mode 100644 (file)
index 0000000..a427c70
--- /dev/null
@@ -0,0 +1,23 @@
+! { dg-do compile }
+!
+! PR fortran/52452
+!
+! Contributed by Roger Ferrer Ibanez
+!
+PROGRAM test_etime
+    IMPLICIT NONE
+    INTRINSIC :: etime
+    REAL(4) :: tarray(1:2)
+    REAL(4) :: result
+
+    CALL etime(tarray, result)
+END PROGRAM test_etime
+
+subroutine test_etime2
+    IMPLICIT NONE
+    INTRINSIC :: etime
+    REAL(4) :: tarray(1:2)
+    REAL(4) :: result
+
+    result = etime(tarray)
+END subroutine test_etime2