public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/98577] Wrong "count_rate" values with int32 and real32 if the "count" argument is int64.
Date: Fri, 08 Jan 2021 16:12:55 +0000	[thread overview]
Message-ID: <bug-98577-4-ncqF5HRx8n@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98577-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98577

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |INVALID

--- Comment #14 from kargl at gcc dot gnu.org ---
(In reply to Chinoune from comment #12)
> First example:
> 
> $ ifort bug_gcc_tic.f90 -o test.x
> $ ./test.x
> count(int_32):                                                              
> count_rate(int32) =        10000                                            
> count_rate(int64) =                  10000                                  
> count_rate(real32) =    10000.00                                            
> count_rate(real64) =    10000.0000000000                                    
> count(int_64):                                                              
> count_rate(int32) =      1000000                                            
> count_rate(int64) =                1000000                                  
> count_rate(real32) =    1000000.                                            
> count_rate(real64) =    1000000.00000000
> 
> Unlike gfortran, count_rate with ifort depends only on the precision of the
> first argument of system_clock. It doesn't mixup.

That is not required by the Fortran Standard, but conforms because
COUNT and COUNT_RATE are processor-dependent.

I also took the opportunity to look at the Intel Fortran documentation at

https://software.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/language-reference/a-to-z-reference/s-1/system-clock.html

dated 4 dec 2020.  Note, the following hightlighted sentence on
that page:

   "All integer arguments used must have the same integer kind parameter."

That is not required by Fortran Standard.  Why would Intel require
compatible kind type parameters?  Your program in comment #0 does
meet the requirements placed on system_clock() by Intel.

  parent reply	other threads:[~2021-01-08 16:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07  4:12 [Bug fortran/98577] New: " mehdi.chinoune at hotmail dot com
2021-01-07 11:36 ` [Bug fortran/98577] " anlauf at gcc dot gnu.org
2021-01-07 13:03 ` mehdi.chinoune at hotmail dot com
2021-01-07 16:32 ` kargl at gcc dot gnu.org
2021-01-07 17:28 ` mehdi.chinoune at hotmail dot com
2021-01-07 18:01 ` sgk at troutmask dot apl.washington.edu
2021-01-07 18:49 ` mehdi.chinoune at hotmail dot com
2021-01-07 18:56 ` mehdi.chinoune at hotmail dot com
2021-01-07 20:27 ` sgk at troutmask dot apl.washington.edu
2021-01-07 20:37 ` kargl at gcc dot gnu.org
2021-01-08  6:18 ` mehdi.chinoune at hotmail dot com
2021-01-08  7:21 ` kargl at gcc dot gnu.org
2021-01-08  8:04 ` mehdi.chinoune at hotmail dot com
2021-01-08  8:27 ` mehdi.chinoune at hotmail dot com
2021-01-08 16:12 ` kargl at gcc dot gnu.org [this message]
2021-01-08 16:42 ` mehdi.chinoune at hotmail dot com
2021-01-08 16:59 ` kargl at gcc dot gnu.org
2021-01-08 18:43 ` mehdi.chinoune at hotmail dot com
2021-01-08 18:55 ` sgk at troutmask dot apl.washington.edu
2021-01-08 19:19 ` sgk at troutmask dot apl.washington.edu
2021-01-09  2:34 ` mehdi.chinoune at hotmail dot com
2021-01-09  3:43 ` kargl at gcc dot gnu.org
2021-01-09  9:00 ` tkoenig at gcc dot gnu.org
2023-05-14 16:01 ` mehdi.chinoune at hotmail dot com
2023-05-14 16:37 ` tkoenig at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-98577-4-ncqF5HRx8n@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).