]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR middle-end/24851 (f2c miscompilation)
authorRichard Guenther <rguenther@suse.de>
Thu, 17 Nov 2005 11:35:00 +0000 (11:35 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 17 Nov 2005 11:35:00 +0000 (11:35 +0000)
commit0bc52d42a8a8c376f9d13a9ea1d5739b6dc3a195
treefa01127a0e850334616461c97e66569538042b89
parentf92af607242414c1ee85a5eab0a9cf131bda0996
re PR middle-end/24851 (f2c miscompilation)

2005-11-16  Richard Guenther  <rguenther@suse.de>

PR middle-end/24851
* fold-const.c (extract_array_ref): Return byte offset
in all cases.
(fold_binary): Fold &x[a] CMP &x[b] to
a*sizeof(*x) CMP b*sizeof(*x) to get correct overflow
behavior.

* gcc.c-torture/execute/pr24851.c: New testcase.

From-SVN: r107117
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr24851.c [new file with mode: 0644]