diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-18 20:05:00 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-18 20:05:00 +0000 |
commit | eb744cd410c8916c74a6b6bcbac95bf56e9ff372 (patch) | |
tree | e0bd20d27931c0f092bc30265db72ff3f635d2eb /gcc/testsuite/gfortran.dg | |
parent | d374ac2e2fc9cfdf28f6f2f1bf95874cc45b458d (diff) | |
download | gcc-eb744cd410c8916c74a6b6bcbac95bf56e9ff372.tar.gz |
* trans-array.c (gfc_build_constant_array_constructor): When the
shape of the constructor is known, use that to construct the
gfc_array_spec.
(gfc_trans_constant_array_constructor): Initialize the "info"
information for all of the dimensions of the array constructor.
(constant_array_constructor_loop_size): New function.
(gfc_trans_array_constructor): Use it to determine whether a
loop is suitable for "constant array constructor" optimization.
* trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
instead of build2, to avoid conditions like "(a != b) != 0".
* gfortran.dg/array_constructor_15.f90: New test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122103 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r-- | gcc/testsuite/gfortran.dg/array_constructor_15.f90 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_15.f90 b/gcc/testsuite/gfortran.dg/array_constructor_15.f90 new file mode 100644 index 00000000000..71260169d58 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/array_constructor_15.f90 @@ -0,0 +1,7 @@ +! { dg-do compile } +! { dg-options "-O2 -fdump-tree-original" } + integer :: x(2,2) + if (any(x(:,:) .ne. reshape ((/ 3, 1, 4, 1 /), (/ 2, 2 /)))) call abort () +end +! { dg-final { scan-tree-dump-times "atmp" 0 "original" } } +! { dg-final { cleanup-tree-dump "original" } } |