source:
patches/gcc-4.1.0-PR26763-1.patch@
07512c4
Last change on this file since 07512c4 was 4fc5a87, checked in by , 19 years ago | |
---|---|
|
|
File size: 3.1 KB |
-
ChangeLog
Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2006-04-17 Initial Package Version: 4.1.0 Origin: Maintainers Upstream Status: Fixed in SVN Description: Fixes an optimization error that can result incorrectly code. See PR's below Issues in CLFS book, this patch fixes the incorrect disk checksums in silo. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27176 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763 diff -Naur gcc-4.1.0.orig/ChangeLog gcc-4.1.0/ChangeLog
old new 1 2006-04-05 Richard Guenther <rguenther@suse.de> 2 3 PR tree-optimization/26763 4 * fold-const.c (fold_binary): Fold PTR + CST CMP PTR + CST 5 only for EQ_EXPR and NE_EXPR. 6 7 * gcc.dg/torture/pr26763-1.c: New testcase. 8 * gcc.dg/torture/pr26763-2.c: Likewise. 9 1 10 2006-02-28 Release Manager 2 11 3 12 * GCC 4.1.0 released. -
gcc/fold-const.c
diff -Naur gcc-4.1.0.orig/gcc/fold-const.c gcc-4.1.0/gcc/fold-const.c
old new 8897 8897 8898 8898 /* If this is a comparison of two exprs that look like an 8899 8899 ARRAY_REF of the same object, then we can fold this to a 8900 comparison of the two offsets. */ 8901 if (TREE_CODE_CLASS (code) == tcc_comparison) 8900 comparison of the two offsets. This is only safe for 8901 EQ_EXPR and NE_EXPR because of overflow issues. */ 8902 if (code == EQ_EXPR || code == NE_EXPR) 8902 8903 { 8903 8904 tree base0, offset0, base1, offset1; 8904 8905 -
gcc/testsuite/ChangeLog
diff -Naur gcc-4.1.0.orig/gcc/testsuite/ChangeLog gcc-4.1.0/gcc/testsuite/ChangeLog
old new 1 2006-04-05 Richard Guenther <rguenther@suse.de> 2 3 PR tree-optimization/26763 4 * fold-const.c (fold_binary): Fold PTR + CST CMP PTR + CST 5 only for EQ_EXPR and NE_EXPR. 6 7 * gcc.dg/torture/pr26763-1.c: New testcase. 8 * gcc.dg/torture/pr26763-2.c: Likewise. 9 1 10 2006-02-28 Release Manager 2 11 3 12 * GCC 4.1.0 released. -
gcc/testsuite/gcc.dg/pr26763-1.ch
diff -Naur gcc-4.1.0.orig/gcc/testsuite/gcc.dg/pr26763-1.ch gcc-4.1.0/gcc/testsuite/gcc.dg/pr26763-1.ch
old new 1 /* { dg-do run } */ 2 3 extern void abort(void); 4 5 int try (int *a) 6 { 7 return a + -1 > a; 8 } 9 10 int main(void) 11 { 12 int bla[100]; 13 14 if (try (bla + 50)) 15 abort (); 16 17 return 0; 18 } -
gcc/testsuite/gcc.dg/pr26763-2.c
diff -Naur gcc-4.1.0.orig/gcc/testsuite/gcc.dg/pr26763-2.c gcc-4.1.0/gcc/testsuite/gcc.dg/pr26763-2.c
old new 1 /* { dg-do run } */ 2 3 extern void abort(void); 4 5 int try (char *a, int d) 6 { 7 return a + d > a; 8 } 9 10 int main(void) 11 { 12 char bla[100]; 13 14 if (try (bla + 50, -1)) 15 abort (); 16 17 return 0; 18 }
Note:
See TracBrowser
for help on using the repository browser.