> Le 21 avr. 2019 à 18:02, Steve Kargl <s...@troutmask.apl.washington.edu> a
> écrit :
>
> On Sat, Apr 20, 2019 at 09:51:11PM +0200, Dominique d'Humières wrote:
>> OK I missed the previous error. However I am still puzzled by (2):
>>
>> +
>> +found outside of a module
>>
>
> Why are you puzzled? Did you read the patch?
I read
Index: gcc/testsuite/gfortran.dg/submodule_22.f08
===================================================================
--- gcc/testsuite/gfortran.dg/submodule_22.f08 (revision 270181)
+++ gcc/testsuite/gfortran.dg/submodule_22.f08 (working copy)
@@ -40,8 +40,10 @@ end
submodule (mtop:submod:subsubmod) subsubsubmod ! { dg-error "Syntax error in
SUBMODULE statement" }
contains
- module subroutine sub3
- r = 2.0
- s = 2.0
- end subroutine sub3
+ module subroutine sub3 ! { dg-error "found outside of a module" }
+ r = 2.0 ! { dg-error "Unexpected assignment" }
+ s = 2.0 ! { dg-error "Unexpected assignment" }
+ end subroutine sub3 ! { dg-error "Expecting END PROGRAM statement" }
end
+
+found outside of a module
^ I cannot relate this to any dejagnu command
Dominique
> The
> entire error message is
>
> + gfc_error ("MODULE prefix at %C found outside of a module, "
> + "submodule, or interface");
>
> In
>
> program foo
> contains
> module subroutine foo
> end subroutine foo
> end program foo
>
> The "MODULE prefix" attached to "subroutine foo" is
> found outside of a module, a submodule, or interface.
>
> --
> Steve