This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57711] Fortran 4.7.2/4.8.1 error: constraints for functions parameters
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Jun 2013 06:11:00 +0000
- Subject: [Bug fortran/57711] Fortran 4.7.2/4.8.1 error: constraints for functions parameters
- Auto-submitted: auto-generated
- References: <bug-57711-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57711
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
First, you have a *serious* bug in JAC/DUMMY_JAC:
Namely, in DUMMY_JAC you have:
double precision, intent(inout) :: RPAR(:)
integer, intent(inout) :: IPAR(:)
(Those have ASSUMED-SHAPE arrays)
And in JAC:
DOUBLE PRECISION, INTENT(INOUT) :: RPAR(*)
INTEGER, INTENT(INOUT) :: IPAR(*)
(And those are ASSUMED-SIZE arrays.)
But for procedures declarations and its interface declarations, either both or
neither has to use assumed-shape arrays. The compilers passes (internally)
arguments quite differently - thus (unless the compiler detects it) it will
cause problems at run time.
Secondly and regrading gfortran:
* For some reasons, it compiles with GCC 4.7 if one calls D_VODE instead of
VODE.
* The error message for generic matching should be better (cf. PR40276). When
checking the interface of dummy procedure, it should be possible to give always
an error.