public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/109511] New: incorrectly rejects set_exponent with constant negative exponent
@ 2023-04-14  9:52 sebastien at debian dot org
  2023-04-14 11:54 ` [Bug fortran/109511] " anlauf at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: sebastien at debian dot org @ 2023-04-14  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109511
           Summary: incorrectly rejects set_exponent with constant
                    negative exponent
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sebastien at debian dot org
  Target Milestone: ---

The following program fails to compile:

program exponent
  print *, set_exponent(1., -1)
end program exponent

With the following error message:

exponent.f08:2:24:

    2 |   print *, set_exponent(1., -1)
      |                        1
Error: Result of SET_EXPONENT overflows its kind at (1)

But as I understand it, this is a valid program.

Note that the problem does not occur if the exponent is positive. It also does
not occur if the exponent is variable (even with a negative value). So it looks
like the static analyzer is overly restrictive.

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

end of thread, other threads:[~2023-04-16 19:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-14  9:52 [Bug fortran/109511] New: incorrectly rejects set_exponent with constant negative exponent sebastien at debian dot org
2023-04-14 11:54 ` [Bug fortran/109511] " anlauf at gcc dot gnu.org
2023-04-14 17:19 ` anlauf at gcc dot gnu.org
2023-04-14 17:36 ` anlauf at gcc dot gnu.org
2023-04-14 19:01 ` anlauf at gcc dot gnu.org
2023-04-14 19:23 ` sebastien at debian dot org
2023-04-14 19:51 ` cvs-commit at gcc dot gnu.org
2023-04-15 13:44 ` cvs-commit at gcc dot gnu.org
2023-04-16 18:52 ` cvs-commit at gcc dot gnu.org
2023-04-16 19:01 ` cvs-commit at gcc dot gnu.org
2023-04-16 19:02 ` anlauf at gcc dot gnu.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).