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/16066] New: [3.4 regression] loop strength reduction bug (wrong code)


[forwarded from http://bugs.debian.org/254659]

seen with 2.95, 3.0, 3,2, fixed in 3.3.4, seen in 3.4 20040613

the following code does not terminate when compiled with -O2 -march=i[34]86,
works ok with O2 -march=i[56]86,

#include <stdio.h>

inline void
h1(int *p) {

        printf("%p\n", p);
}

void
h(int* p, int i) {
        int j;

        for(j = 0; j < 16; j++) {
                h1(p + j);
        }
}

int
main(int argc, char **argv) {

	h((int *)0x7fffffc0, 0);
        exit(0);
}

-- 
           Summary: [3.4 regression] loop strength reduction bug (wrong
                    code)
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i[34]86-linux
  GCC host triplet: i[34]86-linux
GCC target triplet: i[34]86-linux


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


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