2 ! { dg-options "-fdump-tree-original" }
6 ! Contributed by Kontantinos Anagnostopoulos
8 ! The implicit complex conjugate was missing for DOT_PRODUCT
11 ! For the following, the compile-time simplification fails for SUM;
12 ! see PR fortran/56342. Hence, a manually expanded SUM is used.
14 !if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) &
15 ! /= SUM (CONJG ((/ (1.0, 2.0), (2.0, 3.0) /))*(/ (1.0, 1.0), (1.0, 4.0) /))) &
18 !if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), &
19 ! RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) /= &
20 ! SUM ((/ (1.0, 2.0), (2.0, 3.0) /)*(/ (1.0, 1.0), (1.0, 4.0) /)))) &
24 if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) &
25 /= CONJG (cmplx(1.0, 2.0)) * cmplx(1.0, 1.0) &
26 + CONJG (cmplx(2.0, 3.0)) * cmplx(1.0, 4.0)) &
29 if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), &
30 RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) &
31 /= cmplx(1.0, 2.0) * cmplx(1.0, 1.0) &
32 + cmplx(2.0, 3.0) * cmplx(1.0, 4.0))) &
37 ! { dg-final { scan-tree-dump-not "abort" "original" } }