------- Comment #5 from dominiq at lps dot ens dot fr  2009-05-25 20:05 -------
The following invalid code (reduced from the original code):

! { dg-do compile }
! This tests various error messages for PROCEDURE declarations.
! Contributed by Janus Weil <jaydu...@gmail.com>

program prog

contains

  subroutine foo(a,c)
    procedure(c),intent(in):: c  ! { dg-error "PROCEDURE attribute conflicts
with INTENT attribute" }
  end subroutine foo 

end program

seems stuck in an infinite loop (r147851 + '-fwhole-file' patch):

ibook-dhum] f90/bug% gfc proc_decl_1_red.f90
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
proc_decl_1_red.f90:9.20:

  subroutine foo(a,c)
                    1
Error: Interface 'c', used by procedure 'c' at (1), is declared in a later
PROCEDURE statement
Fatal Error: Error count reached limit of 25.


-- 


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

Reply via email to