OSDN Git Service

2011-03-25 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Mar 2011 17:53:35 +0000 (17:53 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Mar 2011 17:53:35 +0000 (17:53 +0000)
        PR fortran/48174
        PR fortran/45304
        * trans-types.c (gfc_get_function_type): Don't use varargs if
        * the
        procedure is known to have no arguments.

2011-03-25  Tobias Burnus  <burnus@net-b.de>

        PR fortran/48174
        PR fortran/45304
        * gfortran.dg/ishft_4.f90: Adapt scan-tree-dump-times.
        * gfortran.dg/leadz_trailz_3.f90: Ditto

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

gcc/fortran/ChangeLog
gcc/fortran/trans-types.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/ishft_4.f90
gcc/testsuite/gfortran.dg/leadz_trailz_3.f90

index 4e0a792..34c7c03 100644 (file)
@@ -1,3 +1,10 @@
+2011-03-25  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48174
+       PR fortran/45304
+       * trans-types.c (gfc_get_function_type): Don't use varargs if the
+       procedure is known to have no arguments.
+
 2010-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/22572
index 258685e..8ecceea 100644 (file)
@@ -2618,7 +2618,7 @@ gfc_get_function_type (gfc_symbol * sym)
 
   if (typelist)
     typelist = chainon (typelist, void_list_node);
-  else if (sym->attr.is_main_program)
+  else if (sym->attr.is_main_program || sym->attr.if_source != IFSRC_UNKNOWN)
     typelist = void_list_node;
 
   if (alternate_return)
index c7e8662..d2a1762 100644 (file)
@@ -1,3 +1,10 @@
+2011-03-25  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/48174
+       PR fortran/45304
+       * gfortran.dg/ishft_4.f90: Adapt scan-tree-dump-times.
+       * gfortran.dg/leadz_trailz_3.f90: Ditto
+
 2011-03-25  Martin Jambor  <mjambor@suse.cz>
 
        * gcc.c-torture/compile/pr44686.c: Do not explicitely specify -O2.
index 0315c7f..4e2ad2b 100644 (file)
@@ -35,6 +35,6 @@ end program
 !   -- once in the function definition itself
 !   -- plus as many times as the function is called
 !
-! { dg-final { scan-tree-dump-times "foo *\\\(\\\)" 6 "original" } }
-! { dg-final { scan-tree-dump-times "bar *\\\(\\\)" 6 "original" } }
+! { dg-final { scan-tree-dump-times "foo *\\\(\\\)" 5 "original" } }
+! { dg-final { scan-tree-dump-times "bar *\\\(\\\)" 5 "original" } }
 ! { dg-final { cleanup-tree-dump "original" } }
index f8466ff..b54a11f 100644 (file)
@@ -26,5 +26,5 @@ end program
 !   -- once in the function definition itself
 !   -- plus as many times as the function is called
 !
-! { dg-final { scan-tree-dump-times "foo *\\\(\\\)" 8 "original" } }
+! { dg-final { scan-tree-dump-times "foo *\\\(\\\)" 7 "original" } }
 ! { dg-final { cleanup-tree-dump "original" } }