This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/32813] [4.3 Regression] ICE for array expression in empty if statement, compiled with -fbounds-check



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]