This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32813] [4.3 Regression] ICE for array expression in empty if statement, compiled with -fbounds-check
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2007 06:35:59 -0000
- Subject: [Bug fortran/32813] [4.3 Regression] ICE for array expression in empty if statement, compiled with -fbounds-check
- References: <bug-32813-14773@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2007-07-19 06:35 -------
This regression is caused by
r126647 | fxcoudert | 2007-07-15 01:59:00 +0200 (So, 15 Jul 2007) | 7 lines
PR 32036
* trans-array.c (gfc_conv_array_ref): Only evaluate index once.
Without bounds check, the if is already optimized away in the original dump.
If one adds something in the if body then w/out -fbounds-check:
if (k[(int8) i + -1] == 0)
and w/:
if (k[NON_LVALUE_EXPR <SAVE_EXPR <(int8) i>> + -1] == 0)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-07-19 06:35:59
date| |
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32813