- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Visual Fortran falis to compile implicit class statements such as:
implicit class(foo) (a-b) implicit class(*) (c)
gfortran had the same bug which was fixed in gfortran 4.9: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56500
Trying to compile the code from the gfortran bug report gives:
Compiling with Intel(R) Visual Fortran Compiler XE 15.0.2.179 [IA-32]... ifort /nologo /debug:full /Od /warn:interfaces /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc120.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qvc12 /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\\bin" "C:\Users\Nicholas\Documents\imp_bug\implicitclass\Source1.f90" C:\Users\Nicholas\Documents\imp_bug\implicitclass\Source1.f90(8): error #5082: Syntax error, found '(' when expecting one of: ( implicit class(foo) (a-b) ----------------------^ C:\Users\Nicholas\Documents\imp_bug\implicitclass\Source1.f90(9): error #5082: Syntax error, found '(' when expecting one of: ( implicit class(*) (c) --------------------^ (trimmed)
Is this a known bug?
This usage is relevant for people trying to simulate generic programming (templates) using a combination of implict, include and renaming in use statements.
Nick
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting. I had not thought this was legal Fortran, but it is. It could be something we overlooked. I will let the developers know. Issue ID is DPD200368505.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We've now fixed this for a release later this year. Thanks for bringing it to our attention.
This illustrates a general problem many compiler developers have had in not catching all of the changes from one standard version to the next. It's why the 2015 standard will include, in its introduction, a summary of EVERY new feature and change.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page