public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/97439] New: Wrong min value generated for DFP numbers
@ 2020-10-15  9:47 krebbel at gcc dot gnu.org
  2020-10-15  9:48 ` [Bug rtl-optimization/97439] " krebbel at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: krebbel at gcc dot gnu.org @ 2020-10-15  9:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97439
           Summary: Wrong min value generated for DFP numbers
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: krebbel at gcc dot gnu.org
  Target Milestone: ---

Created attachment 49374
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49374&action=edit
Testcase

The attached testcase aborts on IBM Z when compiled with:
gcc -O1 t.c -o t

commit id: c1c62aec6751

The x > -Inf comparison is folded by match.pd to x >= DFP128 MIN

However the sign bit is lost when generating DFP128 MIN in decimal_real_maxval

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

* [Bug rtl-optimization/97439] Wrong min value generated for DFP numbers
  2020-10-15  9:47 [Bug rtl-optimization/97439] New: Wrong min value generated for DFP numbers krebbel at gcc dot gnu.org
@ 2020-10-15  9:48 ` krebbel at gcc dot gnu.org
  2020-10-15 12:05 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: krebbel at gcc dot gnu.org @ 2020-10-15  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Created attachment 49375
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49375&action=edit
Fix

decimal_real_maxval misses to set the sign flag in the REAL_VALUE_TYPE.

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

* [Bug rtl-optimization/97439] Wrong min value generated for DFP numbers
  2020-10-15  9:47 [Bug rtl-optimization/97439] New: Wrong min value generated for DFP numbers krebbel at gcc dot gnu.org
  2020-10-15  9:48 ` [Bug rtl-optimization/97439] " krebbel at gcc dot gnu.org
@ 2020-10-15 12:05 ` rguenth at gcc dot gnu.org
  2020-10-22 10:39 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-15 12:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK for all branches.

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

* [Bug rtl-optimization/97439] Wrong min value generated for DFP numbers
  2020-10-15  9:47 [Bug rtl-optimization/97439] New: Wrong min value generated for DFP numbers krebbel at gcc dot gnu.org
  2020-10-15  9:48 ` [Bug rtl-optimization/97439] " krebbel at gcc dot gnu.org
  2020-10-15 12:05 ` rguenth at gcc dot gnu.org
@ 2020-10-22 10:39 ` cvs-commit at gcc dot gnu.org
  2020-10-22 10:42 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-22 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andreas Krebbel <krebbel@gcc.gnu.org>:

https://gcc.gnu.org/g:e3f25eac67aee77af0b2038cd4d6cbd36d7f1030

commit r11-4223-ge3f25eac67aee77af0b2038cd4d6cbd36d7f1030
Author: Andreas Krebbel <krebbel@linux.ibm.com>
Date:   Thu Oct 22 12:24:22 2020 +0200

    Fix PR97439

    decimal_real_maxval misses to set the sign flag in the REAL_VALUE_TYPE.

    gcc/ChangeLog:

            PR rtl-optimization/97439
            * dfp.c (decimal_real_maxval): Set the sign flag in the
            generated number.

    gcc/testsuite/ChangeLog:

            * gcc.dg/dfp/pr97439.c: New test.

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

* [Bug rtl-optimization/97439] Wrong min value generated for DFP numbers
  2020-10-15  9:47 [Bug rtl-optimization/97439] New: Wrong min value generated for DFP numbers krebbel at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-10-22 10:39 ` cvs-commit at gcc dot gnu.org
@ 2020-10-22 10:42 ` cvs-commit at gcc dot gnu.org
  2020-10-22 10:43 ` cvs-commit at gcc dot gnu.org
  2020-10-22 10:44 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-22 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Andreas Krebbel
<krebbel@gcc.gnu.org>:

https://gcc.gnu.org/g:523e6e5bd47bcc03e9782039b52fb3f8b3276e64

commit r10-8937-g523e6e5bd47bcc03e9782039b52fb3f8b3276e64
Author: Andreas Krebbel <krebbel@linux.ibm.com>
Date:   Thu Oct 22 12:24:22 2020 +0200

    Fix PR97439

    decimal_real_maxval misses to set the sign flag in the REAL_VALUE_TYPE.

    gcc/ChangeLog:

            PR rtl-optimization/97439
            * dfp.c (decimal_real_maxval): Set the sign flag in the
            generated number.

    gcc/testsuite/ChangeLog:

            * gcc.dg/dfp/pr97439.c: New test.

    (cherry picked from commit e3f25eac67aee77af0b2038cd4d6cbd36d7f1030)

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

* [Bug rtl-optimization/97439] Wrong min value generated for DFP numbers
  2020-10-15  9:47 [Bug rtl-optimization/97439] New: Wrong min value generated for DFP numbers krebbel at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-10-22 10:42 ` cvs-commit at gcc dot gnu.org
@ 2020-10-22 10:43 ` cvs-commit at gcc dot gnu.org
  2020-10-22 10:44 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-22 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Andreas Krebbel
<krebbel@gcc.gnu.org>:

https://gcc.gnu.org/g:a07af7753004e711d0db8d4e5620a4e8afc8f10c

commit r9-9007-ga07af7753004e711d0db8d4e5620a4e8afc8f10c
Author: Andreas Krebbel <krebbel@linux.ibm.com>
Date:   Thu Oct 22 12:24:22 2020 +0200

    Fix PR97439

    decimal_real_maxval misses to set the sign flag in the REAL_VALUE_TYPE.

    gcc/ChangeLog:

            PR rtl-optimization/97439
            * dfp.c (decimal_real_maxval): Set the sign flag in the
            generated number.

    gcc/testsuite/ChangeLog:

            * gcc.dg/dfp/pr97439.c: New test.

    (cherry picked from commit e3f25eac67aee77af0b2038cd4d6cbd36d7f1030)

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

* [Bug rtl-optimization/97439] Wrong min value generated for DFP numbers
  2020-10-15  9:47 [Bug rtl-optimization/97439] New: Wrong min value generated for DFP numbers krebbel at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-10-22 10:43 ` cvs-commit at gcc dot gnu.org
@ 2020-10-22 10:44 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-22 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Andreas Krebbel
<krebbel@gcc.gnu.org>:

https://gcc.gnu.org/g:2819cdd8ff8e15ed5efb4095143cf531cf3e50f9

commit r8-10593-g2819cdd8ff8e15ed5efb4095143cf531cf3e50f9
Author: Andreas Krebbel <krebbel@linux.ibm.com>
Date:   Thu Oct 22 12:24:22 2020 +0200

    Fix PR97439

    decimal_real_maxval misses to set the sign flag in the REAL_VALUE_TYPE.

    gcc/ChangeLog:

            PR rtl-optimization/97439
            * dfp.c (decimal_real_maxval): Set the sign flag in the
            generated number.

    gcc/testsuite/ChangeLog:

            * gcc.dg/dfp/pr97439.c: New test.

    (cherry picked from commit e3f25eac67aee77af0b2038cd4d6cbd36d7f1030)

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

end of thread, other threads:[~2020-10-22 10:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  9:47 [Bug rtl-optimization/97439] New: Wrong min value generated for DFP numbers krebbel at gcc dot gnu.org
2020-10-15  9:48 ` [Bug rtl-optimization/97439] " krebbel at gcc dot gnu.org
2020-10-15 12:05 ` rguenth at gcc dot gnu.org
2020-10-22 10:39 ` cvs-commit at gcc dot gnu.org
2020-10-22 10:42 ` cvs-commit at gcc dot gnu.org
2020-10-22 10:43 ` cvs-commit at gcc dot gnu.org
2020-10-22 10:44 ` cvs-commit 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).