public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2231] Add testcase from PR25623
@ 2023-07-01 11:45 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2023-07-01 11:45 UTC (permalink / raw)
  To: gcc-cvs

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

commit r14-2231-gee4d85b3a8b76328df6bccc1026d62dff5f827ce
Author: Jan Hubicka <jh@suse.cz>
Date:   Sat Jul 1 13:44:46 2023 +0200

    Add testcase from PR25623
    
    gcc/testsuite/ChangeLog:
    
            PR tree-optimization/25623
            * gfortran.dg/pr25623.f90: New test.

Diff:
---
 gcc/testsuite/gfortran.dg/pr25623.f90 | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gcc/testsuite/gfortran.dg/pr25623.f90 b/gcc/testsuite/gfortran.dg/pr25623.f90
new file mode 100644
index 00000000000..30905e4841c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr25623.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-optimized-blocks -O2" }
+
+SUBROUTINE S42(a,b,c,N)
+ IMPLICIT NONE
+ integer :: N
+ real*8  :: a(N),b(N),c(N),tmp,tmp2,tmp4
+ real*8, parameter :: p=1.0D0/3.0D0
+ integer :: i
+ c=0.0D0
+ DO i=1,N
+   tmp=a(i)**p ! could even be done with a cube root
+   tmp2=tmp*tmp
+   tmp4=tmp2*tmp2
+   b(i)=b(i)+tmp4
+   c(i)=c(i)+tmp2
+ ENDDO
+END SUBROUTINE
+! { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-01 11:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-01 11:45 [gcc r14-2231] Add testcase from PR25623 Jan Hubicka

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