http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56284



--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-02-11 
19:06:10 UTC ---

> The combined patches of comment 4 and 5 yield the following testsuite 
> failures:

>

> FAIL: gfortran.dg/altreturn_2.f90  -O  (test for excess errors)

> FAIL: gfortran.dg/intrinsic_actual_3.f90  -O  (test for excess errors)

> FAIL: gfortran.dg/invalid_interface_assignment.f90  -O  (test for excess

> errors)



These tests are complied with -pedantic-errors and after the patch in comment

#5,

their compilation gives the corresponding warning:



Warning: Obsolescent feature: Alternate return argument at (1)



The tests pass with the following patch



--- /opt/gcc/_clean/gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90 

  2010-02-10 17:54:15.000000000 +0100

+++ /opt/gcc/work/gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90   

2013-02-11 19:57:39.000000000 +0100

@@ -12,8 +12,9 @@ MODULE TT

    MODULE PROCEDURE set

  END INTERFACE

 CONTAINS

-  PURE SUBROUTINE set(x1,*) ! { dg-error "Alternate return cannot appear" }

+  PURE SUBROUTINE set(x1,*) ! { dg-warning "Obsolescent feature: Alternate

return argument" }

     TYPE(data_type), INTENT(OUT) :: x1

     x1%i=0

   END SUBROUTINE set

 END MODULE

+! { dg-error "Alternate return cannot appear" "" { target *-*-* } 15 }

--- /opt/gcc/_clean/gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90   

2009-11-25 18:17:42.000000000 +0100

+++ /opt/gcc/work/gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90   

2013-02-11 19:50:13.000000000 +0100

@@ -6,7 +6,7 @@

 !

 program ar1

     interface random_seed

-      subroutine x (a, *)

+      subroutine x (a, *) ! { dg-warning "Obsolescent feature: Alternate

return argument" }

         integer a

       end subroutine x

     end interface random_seed

--- /opt/gcc/_clean/gcc/testsuite/gfortran.dg/altreturn_2.f90    2009-11-25

18:17:47.000000000 +0100

+++ /opt/gcc/work/gcc/testsuite/gfortran.dg/altreturn_2.f90    2013-02-11

19:48:14.000000000 +0100

@@ -2,7 +2,7 @@

        program altreturn_2

          call foo()  ! { dg-error "Missing alternate return" }

        contains

-         subroutine foo(*)

+         subroutine foo(*) ! { dg-warning "Obsolescent feature: Alternate

return argument" }

            return

          end subroutine

        end program



I don't know if it is the RIGHT fix, but at least it works (tested with



make -k check-gfortran RUNTESTFLAGS="dg.exp=invalid_interface_assignment.f90

--target_board=unix'{-m32,-m64}'"



and so on for the other two cases.

Reply via email to