PR102619 test program at the very end of "submit.diff"
"Wyche, George G via Gcc-help" <[email protected]> Fri, 27 Mar 2026 20:18:26 +0000
| Newsgroups | gmane.comp.gcc.help |
|---|---|
| Message-ID | <PH1P110MB161793AA06CA078E9346CBEFF557A@PH1P110MB1617.NAMP110.PROD.OUTLOOK.COM> |
+program p + implicit none + real :: w(2,3) + real, allocatable :: y(:) + y = h(w) ! Caused an ICE !<---- indeed gFortran does this + if (size (y) /= product (shape (w))) stop 1 + if (any (int (y) /= [1,2,3,4,5,6])) stop 2 + deallocate (y) +contains + function h(x) result (g) + real :: x(..) !<----------What is this?---------------------------- + real :: g(product(shape(x))) + integer :: i + if (any (shape (x) /= shape (w))) stop 3 + g = [(real(i),i=1,size(g))] + end +end