This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC PATCH PR64432 system_clock regression


On 03/01/2015 01:28 AM, Janne Blomqvist wrote:

No idea about the PowerPC failure, but I wonder why is such a
complicated approach needed, and why is there a need for the new
library entry points? Wouldn't the issue reported in the PR (i.e.
calling SYSTEM_CLOCK with mixed integer kinds, which is a bit
nonsensical but standard-conforming) be fixed by simply something like

Of course I agree its nonsensical, but this is what it says. I got into this out of curiosity about how one would achieve it.


if (all arguments are integer(kind >= 8) or real)
    system_clock_8
else
   system_clock_4

which can be evaluated at compile time as types and kinds are fixed,
and no new library symbols are required.


I actually started out as you describe. I then was having problems getting the results of the calls to system_clock4 and 8 to transfer properly back into the callers variables of different kinds. Similarly to what I am now seeing on PowerPC. I simply had better results with KIND=2 for those cases.

I am fairly certain I am missing a step in the conversion process. I will keep exploring.

Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]