The Fortran testcase gfortran.dg/logical_dot_product.f90 fails with the following middle-end message on SPU. As far as I can see, the generated tree by the front end is OK and I also do not see any bit field which presumably comes about due to the optimization. The code is:
logical :: l1(4) = (/.TRUE.,.FALSE.,.TRUE.,.FALSE./) logical :: l2(4) = (/.FALSE.,.TRUE.,.FALSE.,.TRUE./) if (dot_product (l1, l2)) call abort () l2 = .TRUE. if (.not.dot_product (l1, l2)) call abort () end and the dump shows that the same "int"-wide (4 byte) logical data type is used for both static logical(kind=4) l1[4] = {1, 0, 1, 0}; static logical(kind=4) l2[4] = {0, 1, 0, 1}; The error message is: /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-build/gcc/testsuite/gfortran2/../../gfortran -B/home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-build/gcc/testsuite/gfortran2/../../ /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90 -O3 -fomit-frame-pointer -pedantic-errors -Wl,--gc-sections -B/home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-build/spu/./libgfortran/.libs -L/home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-build/spu/./libgfortran/.libs -L/home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-build/spu/./libiberty -Wl,--auto-overlay -Wl,--reserved-space=131072 -lm -o ./logical_dot_product.exe /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90: In function 'main': /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90:11:0: error: integral result type precision does not match field size of BIT_FIELD_REF BIT_FIELD_REF <vect_var_.52_105, 32, 0> f951: note: in statement stmp_var_.53_106 = BIT_FIELD_REF <vect_var_.52_105, 32, 0>; /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90:11:0: error: integral result type precision does not match field size of BIT_FIELD_REF BIT_FIELD_REF <vect_var_.52_105, 32, 32> f951: note: in statement stmp_var_.53_107 = BIT_FIELD_REF <vect_var_.52_105, 32, 32>; /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90:11:0: error: integral result type precision does not match field size of BIT_FIELD_REF BIT_FIELD_REF <vect_var_.52_105, 32, 64> f951: note: in statement stmp_var_.53_109 = BIT_FIELD_REF <vect_var_.52_105, 32, 64>; /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90:11:0: error: integral result type precision does not match field size of BIT_FIELD_REF BIT_FIELD_REF <vect_var_.52_105, 32, 96> f951: note: in statement stmp_var_.53_111 = BIT_FIELD_REF <vect_var_.52_105, 32, 96>; /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90:11:0: error: integral result type precision does not match field size of BIT_FIELD_REF BIT_FIELD_REF <vect_var_.31_73, 32, 0> f951: note: in statement stmp_var_.32_74 = BIT_FIELD_REF <vect_var_.31_73, 32, 0>; /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90:11:0: error: integral result type precision does not match field size of BIT_FIELD_REF BIT_FIELD_REF <vect_var_.31_73, 32, 32> f951: note: in statement stmp_var_.32_75 = BIT_FIELD_REF <vect_var_.31_73, 32, 32>; /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90:11:0: error: integral result type precision does not match field size of BIT_FIELD_REF BIT_FIELD_REF <vect_var_.31_73, 32, 64> f951: note: in statement stmp_var_.32_77 = BIT_FIELD_REF <vect_var_.31_73, 32, 64>; /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90:11:0: error: integral result type precision does not match field size of BIT_FIELD_REF BIT_FIELD_REF <vect_var_.31_73, 32, 96> f951: note: in statement stmp_var_.32_79 = BIT_FIELD_REF <vect_var_.31_73, 32, 96>; /home/kwerner/dailybuild/spu-tc-2010-03-01/gcc-head/src/gcc/testsuite/gfortran.dg/logical_dot_product.f90:11:0: internal compiler error: verify_stmts failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE: verify_stmts failed / not match field size of BIT_FIELD_REF (logical_dot_product.f90) Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org GCC target triplet: spu-unknown-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43252