public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/109008] New: [13 Regression ]Maybe wrong code in scipy package since r13-3926-gd4c2f1d376da6f
@ 2023-03-03 12:08 marxin at gcc dot gnu.org
  2023-03-03 12:11 ` [Bug tree-optimization/109008] [13 Regression] Maybe " rguenth at gcc dot gnu.org
                   ` (50 more replies)
  0 siblings, 51 replies; 52+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-03-03 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109008
           Summary: [13 Regression ]Maybe wrong code in scipy package
                    since r13-3926-gd4c2f1d376da6f
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: aldyh at gcc dot gnu.org, jakub at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54578
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54578&action=edit
test-case

Since the revision, the scipy package fails in tests due to:
https://github.com/scipy/scipy/blob/main/scipy/integrate/odepack/vode.f#L3500-L3515

$ cat /tmp/x.f
      DOUBLE PRECISION FUNCTION D1MACH (IDUM)
      INTEGER IDUM
C-----------------------------------------------------------------------
C This routine computes the unit roundoff of the machine.
C This is defined as the smallest positive machine number
C u such that  1.0 + u .ne. 1.0
C
C Subroutines/functions called by D1MACH.. None
C-----------------------------------------------------------------------
      DOUBLE PRECISION U, COMP
      U = 1.0D0
 10   U = U*0.5D0
      COMP = 1.0D0 + U
      IF (COMP .NE. 1.0D0) GO TO 10
      D1MACH = U*2.0D0
      RETURN

      END FUNCTION D1MACH

$ gcc /tmp/x.f -c -O2 -fdump-tree-optimized=/dev/stdout
;; Function d1mach (d1mach_, funcdef_no=0, decl_uid=4259, cgraph_uid=1,
symbol_order=0)

__attribute__((fn spec (". w ")))
real(kind=8) d1mach (integer(kind=4) & restrict idum)
{
  <bb 2> [local count: 20293720]:
  return 0.0;

}

Before the revision we did:


;; Function d1mach (d1mach_, funcdef_no=0, decl_uid=4259, cgraph_uid=1,
symbol_order=0)

Removing basic block 5
__attribute__((fn spec (". w ")))
real(kind=8) d1mach (integer(kind=4) & restrict idum)
{
  real(kind=8) u;
  real(kind=8) _1;
  character(kind=4) ivtmp_7;
  character(kind=4) ivtmp_8;

  <bb 2> [local count: 20293720]:

  <bb 3> [local count: 1073741824]:
  # u_2 = PHI <1.0e+0(2), u_4(3)>
  # ivtmp_7 = PHI <53(2), ivtmp_8(3)>
  u_4 = u_2 * 5.0e-1;
  ivtmp_8 = ivtmp_7 + 4294967295;
  if (ivtmp_8 != 0)
    goto <bb 3>; [98.11%]
  else
    goto <bb 4>; [1.89%]

  <bb 4> [local count: 20293720]:
  _1 = u_4 * 2.0e+0;
  return _1;

}

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

end of thread, other threads:[~2023-03-22  9:07 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-03 12:08 [Bug tree-optimization/109008] New: [13 Regression ]Maybe wrong code in scipy package since r13-3926-gd4c2f1d376da6f marxin at gcc dot gnu.org
2023-03-03 12:11 ` [Bug tree-optimization/109008] [13 Regression] Maybe " rguenth at gcc dot gnu.org
2023-03-03 12:14 ` rguenth at gcc dot gnu.org
2023-03-03 12:18 ` [Bug tree-optimization/109008] [13 Regression] Wrong " rguenth at gcc dot gnu.org
2023-03-03 12:24 ` rguenth at gcc dot gnu.org
2023-03-03 12:27 ` rguenth at gcc dot gnu.org
2023-03-03 12:31 ` jakub at gcc dot gnu.org
2023-03-03 12:54 ` jakub at gcc dot gnu.org
2023-03-03 13:03 ` rguenth at gcc dot gnu.org
2023-03-03 13:10 ` rguenth at gcc dot gnu.org
2023-03-03 13:14 ` rguenth at gcc dot gnu.org
2023-03-03 13:34 ` jakub at gcc dot gnu.org
2023-03-03 13:50 ` rguenth at gcc dot gnu.org
2023-03-03 14:28 ` jakub at gcc dot gnu.org
2023-03-07 12:06 ` rguenth at gcc dot gnu.org
2023-03-07 12:12 ` jakub at gcc dot gnu.org
2023-03-07 12:20 ` jakub at gcc dot gnu.org
2023-03-07 12:23 ` rguenth at gcc dot gnu.org
2023-03-07 12:25 ` rguenth at gcc dot gnu.org
2023-03-07 13:16 ` jakub at gcc dot gnu.org
2023-03-07 13:18 ` rguenth at gcc dot gnu.org
2023-03-07 13:29 ` rguenth at gcc dot gnu.org
2023-03-07 13:58 ` rguenth at gcc dot gnu.org
2023-03-07 14:10 ` rguenth at gcc dot gnu.org
2023-03-07 18:52 ` jakub at gcc dot gnu.org
2023-03-07 19:39 ` jakub at gcc dot gnu.org
2023-03-07 20:49 ` jakub at gcc dot gnu.org
2023-03-08  9:26 ` aldyh at gcc dot gnu.org
2023-03-08  9:29 ` aldyh at gcc dot gnu.org
2023-03-08  9:36 ` jakub at gcc dot gnu.org
2023-03-08 10:09 ` aldyh at gcc dot gnu.org
2023-03-08 11:29 ` jakub at gcc dot gnu.org
2023-03-08 11:30 ` jakub at gcc dot gnu.org
2023-03-08 14:51 ` jakub at gcc dot gnu.org
2023-03-08 14:52 ` jakub at gcc dot gnu.org
2023-03-08 15:07 ` jakub at gcc dot gnu.org
2023-03-08 15:54 ` jakub at gcc dot gnu.org
2023-03-08 16:37 ` jakub at gcc dot gnu.org
2023-03-08 18:56 ` jakub at gcc dot gnu.org
2023-03-08 20:02 ` jakub at gcc dot gnu.org
2023-03-09  8:52 ` cvs-commit at gcc dot gnu.org
2023-03-09 10:24 ` rguenth at gcc dot gnu.org
2023-03-09 11:06 ` jakub at gcc dot gnu.org
2023-03-09 11:12 ` marxin at gcc dot gnu.org
2023-03-09 11:50 ` jakub at gcc dot gnu.org
2023-03-09 12:34 ` rguenth at gcc dot gnu.org
2023-03-09 12:56 ` jakub at gcc dot gnu.org
2023-03-09 13:03 ` jakub at gcc dot gnu.org
2023-03-09 13:25 ` jakub at gcc dot gnu.org
2023-03-10  9:08 ` cvs-commit at gcc dot gnu.org
2023-03-10 11:41 ` cvs-commit at gcc dot gnu.org
2023-03-22  9:07 ` 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).