Bug 34663 - Specification expression is defined by dummy variables of different entry points
Summary: Specification expression is defined by dummy variables of different entry points
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2008-01-03 20:19 UTC by Joost VandeVondele
Modified: 2019-01-20 23:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-01-04 07:16:50


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2008-01-03 20:19:45 UTC
The following is non-standard and the compiler should probably generate a
warning/error with '-pedantic -std=f95', but does not do so with
gcc version 4.3.0 20080103 (experimental) [trunk revision 131300] (GCC)

   SUBROUTINE S1(I)
   CHARACTER(LEN=I+J) :: a
   ENTRY E1(J)
   END SUBROUTINE S1
   END
Comment 1 Tobias Burnus 2008-01-04 07:16:50 UTC
Interestingly, NAG f95 does not detect this. ifort prints only a warning:
  Warning: This entry point does not define all dummy variables used in bounds or 
  length expressions of automatic data objects.   [S1]
whereas g95 prints an error:
  Error: Specification expression at (1) is defined by dummy variables of different entry points
Comment 2 Joost VandeVondele 2008-12-05 16:30:35 UTC
still fails in 4.4
Comment 3 Jürgen Reuter 2019-01-20 23:34:43 UTC
Entry is now a F2008 obsolescent feature. Neither nagfor nor PGI catch this.