Comments (7)
The above issue can be reproduced with the following example:
module mymod
implicit none
type :: mytype
private
integer :: a
contains
procedure,private :: eq
generic :: operator(==) => eq
endtype mytype
interface mytype
module procedure :: constructor
endinterface mytype
contains
type(mytype) function constructor(a)
integer,intent(in),optional :: a
if(present(a))then
constructor % a = a
else
constructor % a = 0
endif
endfunction constructor
logical function eq(m0,m1)
class(mytype),intent(in) :: m0
class(mytype),intent(in) :: m1
eq = m0 % a == m1 % a
endfunction eq
endmodule mymod
module wrapper_module
use mymod,only:mytype
endmodule wrapper_module
program test
use wrapper_module
implicit none
write(*,*)mytype() == mytype(0)
endprogram test
The code compiles and executes as expected if only:mytype
is omitted from the use
statement in the wrapper_module
, but not otherwise. Filed this on Intel Fortran forums, currently pending.
from datetime-fortran.
https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/685085
from datetime-fortran.
It seems that replacing the specific use
statements from the parent module, i.e.:
use mod_datetime, only:datetime,date2num,datetimeRange,daysInMonth,&
daysInYear,isLeapYear,num2date,strptime,tm2date
use mod_timedelta,only:timedelta
use mod_clock, only:clock
use mod_strftime, only:tm_struct,c_strftime,c_strptime
with the general all-inclusive statements like:
use mod_datetime
use mod_timedelta
use mod_clock
use mod_strftime
makes ifort not complain anymore about binary operators not being defined. So, for some reason, when importing the datetime
type from mod_datetime
, ifort is unable to import the overloaded operators as well. I do not understand why. Happens with both v16 and v17. gfortran reports no issue at all. for the time being, will use the all-inclusive use statements because ifort needs them.
I am still not able to reproduce this behavior with a simpler example. Stay tuned.
from datetime-fortran.
Filed this on Intel Fortran forums, currently pending.
Link?
from datetime-fortran.
The issue remains as of 19.0.1.144 Build 20181018 on 64-bit Linux.
from datetime-fortran.
This issue should be resolved thanks to switching to single-module library in #69. Needs to be confirmed.
from datetime-fortran.
No issue with ifort 2021.1 Beta 20200602. Closing.
from datetime-fortran.
Related Issues (20)
- Document building with cmake and autotools HOT 1
- Define output (write) methods for datetime and timedelta instances HOT 1
- strptime does not handle errors HOT 1
- Cannot set seconds or others of timedelta HOT 3
- strptime does not zero tm struct before calling c_strptime HOT 1
- Error invoking datetime constructor with ifort-17.0.5 HOT 10
- Very strange (possibly compiler) bug with date2num HOT 3
- incorrect literal with REAL64 kind HOT 8
- add support for mingw HOT 1
- Can't build tests on win-ifort. Fails on linker with strptime HOT 4
- "undefined reference" when using datetime-fortran HOT 7
- Building with autotools (not all libs are copied) HOT 9
- Dealing with huge timedelta values HOT 5
- Generic procedure including a sub-class of TimeDelta HOT 3
- Bug in function now() HOT 2
- Strptime Undefined Reference Error HOT 7
- Hour comparison in num2date is incorrect HOT 2
- Function that ingests ISO format and returns datetime? HOT 1
- CMake uses different compiler flags to autotools HOT 6
- Processing of `secondsSinceEpoch` and its reverse processing routine. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datetime-fortran.