Summary: | [4.1 only] Bounds check generates wrong code for associated(p1(i)%p2,p1(i)%p2) | ||
---|---|---|---|
Product: | gcc | Reporter: | Tobias Burnus <burnus> |
Component: | fortran | Assignee: | Paul Thomas <pault> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs |
Priority: | P3 | Keywords: | wrong-code |
Version: | 4.3.0 | ||
Target Milestone: | 4.2.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2006-12-20 14:16:32 | |
Bug Depends on: | |||
Bug Blocks: | 29975 |
Description
Tobias Burnus
2006-12-12 22:50:39 UTC
If I dump the original tree, I find: { ... int8 D.1351; int8 D.1350; int8 D.1349; D.1351 = (int8) i; if( ... (t.dim[0].lbound > D.1351, 0)) ... if( ... (t.dim[0].ubound < D.1351, 0)) ... D.1352 = _gfortran_associated(...[t.dim[0].stride * D.1350 + t.offset].p, ...[t.dim[0].stride * D.1351 + t.offset].p) && ([t.dim[0].stride * D.1349 + t.offset].p.dim[0].stride != 0; } Question: What values have D.1350 and D.1349? The patch will be submitted, as soon as it has regtested. Paul Subject: Bug number PR30190 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01444.html Subject: Bug 30190 Author: pault Date: Wed Dec 20 21:10:51 2006 New Revision: 120084 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120084 Log: 2006-12-20 Paul Thomas <pault@gcc.gnu.org> PR fortran/30190 * trans-array.c (gfc_conv_array_ref): Remove gfc_evaluate_now from the -fbounds-check branch. 2006-12-20 Paul Thomas <pault@gcc.gnu.org> PR fortran/30190 * gfortran.dg/bounds_check_5.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/bounds_check_5.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/testsuite/ChangeLog Subject: Bug 30190 Author: pault Date: Sun Dec 31 15:00:18 2006 New Revision: 120298 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120298 Log: 2006-12-31 Paul Thomas <pault@gcc.gnu.org> BACKPORTS from 4.3 PR fortran/30202 * trans-array.c (gfc_conv_function_call): Use parmse.expr for the nullifying of intent(out) arguments rather than the backend declaration. PR fortran/30190 * trans-array.c (gfc_conv_array_ref): Remove gfc_evaluate_now from the -fbounds-check branch. PR fortran/29992 * interface.c (check_sym_interfaces): Module procedures in a generic must be use associated or contained in the module. * decl.c (gfc_match_modproc): Set attribute mod_proc. * gfortran.h (symbol_attribute): Add mod_proc atribute. PR fortran/30081 * resolve.c (resolve_generic_f, resolve_generic_s): Use gfc_intrinsic_name to find out if the function is intrinsic because it does not have to be a generic intrinsic to be overloaded. PR fortran/30236 * interface.c (compare_interfaces): Handle NULL symbols. (count_types_test): Count NULL symbols, which correspond to alternate returns. (check_interface1): Change final argument from int to bool in the function and all references. 2006-12-31 Paul Thomas <pault@gcc.gnu.org> BACKPORTS from 4.3 PR fortran/30202 * gfortran.dg/alloc_comp_basics_3.f90: New test. PR fortran/30190 * gfortran.dg/bounds_check_5.f90: New test. PR fortran/29992 * gfortran.dg/generic_9.f90: New test. PR fortran/30081 * gfortran.dg/generic_10.f90: New test. PR fortran/30236 * gfortran.dg/altreturn_3.f90: New test. * gfortran.dg/char_result_12.f90: Fix comment typos. Added: branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/alloc_comp_basics_3.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/bounds_check_5.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/generic_10.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/generic_9.f90 Modified: branches/gcc-4_2-branch/gcc/fortran/ChangeLog branches/gcc-4_2-branch/gcc/fortran/decl.c branches/gcc-4_2-branch/gcc/fortran/gfortran.h branches/gcc-4_2-branch/gcc/fortran/interface.c branches/gcc-4_2-branch/gcc/fortran/resolve.c branches/gcc-4_2-branch/gcc/fortran/trans-array.c branches/gcc-4_2-branch/gcc/fortran/trans-expr.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog Fixed on trunk and 4.2 Paul |