This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35418] New: [4.4 Regression]: Revision 132592 miscompiles 172.mgrid
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2008 22:11:56 -0000
- Subject: [Bug fortran/35418] New: [4.4 Regression]: Revision 132592 miscompiles 172.mgrid
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
On Linux/Intel64, gcc 4.4 revision 132592 miscompiles 172.mgrid in SPEC CPU 2K
with -O2 -ffast-math. This part of change:
Index: gcc/fortran/trans-array.c
===================================================================
--- gcc/fortran/trans-array.c (revision 132591)
+++ gcc/fortran/trans-array.c (revision 132592)
@@ -3937,10 +3949,10 @@ gfc_trans_array_bounds (tree type, gfc_s
/* Make sure that negative size arrays are translated
to being zero size. */
- tmp = build2 (GE_EXPR, boolean_type_node,
- stride, gfc_index_zero_node);
- tmp = build3 (COND_EXPR, gfc_array_index_type, tmp,
- stride, gfc_index_zero_node);
+ tmp = fold_build2 (GE_EXPR, boolean_type_node,
+ stride, gfc_index_zero_node);
+ tmp = fold_build3 (COND_EXPR, gfc_array_index_type, tmp,
+ stride, gfc_index_zero_node);
gfc_add_modify_expr (pblock, stride, tmp);
}
miscompiles RESID, which has nested loops on 3-d arrays. Does it ring a bell?
--
Summary: [4.4 Regression]: Revision 132592 miscompiles 172.mgrid
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35418