public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/40205] OpenMP do loop with MAXINT gives wrong trip count
       [not found] <bug-40205-4@http.gcc.gnu.org/bugzilla/>
@ 2012-09-30 21:29 ` pkeir at outlook dot com
  2012-10-17 17:11 ` burnus at gcc dot gnu.org
  1 sibling, 0 replies; 4+ messages in thread
From: pkeir at outlook dot com @ 2012-09-30 21:29 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40205

--- Comment #3 from Paul Keir <pkeir at outlook dot com> 2012-09-30 21:29:22 UTC ---
Still present in GFortran 4.7.2 on 32-bit Ubuntu 12.04.1.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/40205] OpenMP do loop with MAXINT gives wrong trip count
       [not found] <bug-40205-4@http.gcc.gnu.org/bugzilla/>
  2012-09-30 21:29 ` [Bug middle-end/40205] OpenMP do loop with MAXINT gives wrong trip count pkeir at outlook dot com
@ 2012-10-17 17:11 ` burnus at gcc dot gnu.org
  1 sibling, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-10-17 17:11 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40205

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |burnus at gcc dot gnu.org
         Resolution|                            |WONTFIX

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-10-17 17:10:40 UTC ---
(In reply to comment #0)
>   upper = huge(maxint)
>   lower = upper - 9    ! The 9 can of course be changed
> !$omp parallel do
>   do i = lower, upper

As the Fortran program is nonconforming (even without OpenMP), I close this PR
as WONTFIX.

The reason that the program is nonconforming is the same as the OpenMP issue:
One has "huge(i)+1" which is not representable.

In case of Fortran, the standard effectively mandates that the DO variable "i"
is "upper + 1" after the loop, but that number is not representable if "upper"
is "huge(i)". As it is not representable, the code is nonconforming. See PR
54932 for quotes from the standard.

(For the OpenMP part, one has "<= ubound" which is transformed to "< ubound+1".
That part could be fixed, but why should one bother if the Fortran code itself
is already invalid.)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/40205] OpenMP do loop with MAXINT gives wrong trip count
  2009-05-20 11:13 [Bug fortran/40205] New: " pkeir at dcs dot gla dot ac dot uk
  2009-05-20 11:28 ` [Bug middle-end/40205] " rguenth at gcc dot gnu dot org
@ 2009-09-26 10:16 ` steven at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-09-26 10:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from steven at gcc dot gnu dot org  2009-09-26 10:15 -------
Jakub, OpenMP bug, is this something you have time for?


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40205


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/40205] OpenMP do loop with MAXINT gives wrong trip count
  2009-05-20 11:13 [Bug fortran/40205] New: " pkeir at dcs dot gla dot ac dot uk
@ 2009-05-20 11:28 ` rguenth at gcc dot gnu dot org
  2009-09-26 10:16 ` steven at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-05-20 11:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-05-20 11:28 -------
Confirmed.  extract_omp_for_data "canonicalizes" <= and >= to < and > by
adding/subtracting one to/from the bound.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|fortran                     |middle-end
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2009-05-20 11:28:36
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40205


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-17 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-40205-4@http.gcc.gnu.org/bugzilla/>
2012-09-30 21:29 ` [Bug middle-end/40205] OpenMP do loop with MAXINT gives wrong trip count pkeir at outlook dot com
2012-10-17 17:11 ` burnus at gcc dot gnu.org
2009-05-20 11:13 [Bug fortran/40205] New: " pkeir at dcs dot gla dot ac dot uk
2009-05-20 11:28 ` [Bug middle-end/40205] " rguenth at gcc dot gnu dot org
2009-09-26 10:16 ` steven at gcc dot gnu dot org

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).