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 c/37665] New: invalid loop generation


At optimization levels -Os, -O1, and -O2, the attached program generates
incorrect loop code.  It appears that when optimizing, the loop termination is
checking array end address versus current pointer.  The array end address
contains all address bits while the current pointer is just the lower (16?)
bits.

m32c-elf-gcc -O1 -mcpu=m32cm -msim m1.c && m32c-elf-run a.out 
NULL pointer dereference

Attaching test program.


-- 
           Summary: invalid loop generation
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: joel at gcc dot gnu dot org
GCC target triplet: m32c-elf


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


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