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 tree-optimization/35607] New: [4.4 Regression] IVOPTs produces invalid gimple


extern void (*__fini_array_start []) (void);
extern void (*__fini_array_end []) (void);
void
__libc_csu_fini (void)
{

  __SIZE_TYPE__ i = __fini_array_end - __fini_array_start;
  while (i-- > 0)
    (*__fini_array_start [i]) ();
}

./cc1 -quiet elf-init.i -O
elf-init.i: In function '__libc_csu_fini':
elf-init.i:5: error: invalid array index
(unsigned int) D.1189_5;

elf-init.i:5: internal compiler error: verify_stmts failed

The offending stmt is

  # ivtmp.16_1 = PHI <ivtmp.16_11(5), &__fini_array_start[(unsigned int)
D.1189_5](3)>

it eventually should have used i_6 which is available as

  i_6 = (unsigned int) D.1189_5;


working in rev. 133101, failing since at least rev. 133134. which includes
the fix for PR31358 which is likely the cause.


-- 
           Summary: [4.4 Regression] IVOPTs produces invalid gimple
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
OtherBugsDependingO 31358
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35607


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