public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/45122] New: [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution
@ 2010-07-29 1:13 zsojka at seznam dot cz
2010-07-29 1:25 ` [Bug tree-optimization/45122] " zsojka at seznam dot cz
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-29 1:13 UTC (permalink / raw)
To: gcc-bugs
With -funsafe-loop-optimizations in flags, pr27285.c FAILs:
FAIL: gcc.c-torture/execute/pr27285.c execution, -O1
FAIL: gcc.c-torture/execute/pr27285.c execution, -O2
FAIL: gcc.c-torture/execute/pr27285.c execution, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/pr27285.c execution, -O3 -fomit-frame-pointer
-funroll-loops
FAIL: gcc.c-torture/execute/pr27285.c execution, -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions
FAIL: gcc.c-torture/execute/pr27285.c execution, -O3 -g
FAIL: gcc.c-torture/execute/pr27285.c execution, -O2 -flto
FAIL: gcc.c-torture/execute/pr27285.c execution, -O2 -fwhopr
Output:
$ gcc -O -funsafe-loop-optimizations pr27285.i -Wunsafe-loop-optimizations
/mnt/svn/gcc-trunk/gcc/testsuite/gcc.c-torture/execute/pr27285.c: In function
'foo':
/mnt/svn/gcc-trunk/gcc/testsuite/gcc.c-torture/execute/pr27285.c:19:10:
warning: assuming that the loop counter does not overflow
[-Wunsafe-loop-optimizations]
/mnt/svn/gcc-trunk/gcc/testsuite/gcc.c-torture/execute/pr27285.c:17:9: warning:
assuming that the loop counter does not overflow [-Wunsafe-loop-optimizations]
$ ./a.out
Aborted
There is no overflow in the loop.
When compiled with -funsafe-loop-optimizations, the loop is exited when 'b' has
value 1 (that is, e[a] = d[a] & c; is not executed when b == 0). 'b' has values
of 25,17,19,1 (and then the loop ends) - without -funsafe-loop-optimizations,
it has values 25,17,19,1,0.
Even though -funsafe-loop-optimizations is expected to be unsafe, this
behaviour makes it unusable. The loop is finite and the counter doesn't
overflow, so this is a wrong code generated.
Tested revisions:
r162653 - fail
r162456 - OK
--
Summary: [4.6 Regression] -funsafe-loop-optimizations causes
FAIL: gcc.c-torture/execute/pr27285.c execution
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution
2010-07-29 1:13 [Bug tree-optimization/45122] New: [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution zsojka at seznam dot cz
@ 2010-07-29 1:25 ` zsojka at seznam dot cz
2010-07-29 1:28 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-29 1:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from zsojka at seznam dot cz 2010-07-29 01:24 -------
"25,17,19,1" should have been "25,17,9,1"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution
2010-07-29 1:13 [Bug tree-optimization/45122] New: [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution zsojka at seznam dot cz
2010-07-29 1:25 ` [Bug tree-optimization/45122] " zsojka at seznam dot cz
@ 2010-07-29 1:28 ` pinskia at gcc dot gnu dot org
2010-07-29 9:40 ` rguenth at gcc dot gnu dot org
2010-09-02 11:13 ` rguenth at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-07-29 1:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2010-07-29 01:28 -------
IV-OPTS is choosing b-8 as the IV which seems wrong anyways as that produces
worse code as far as I can tell.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution
2010-07-29 1:13 [Bug tree-optimization/45122] New: [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution zsojka at seznam dot cz
2010-07-29 1:25 ` [Bug tree-optimization/45122] " zsojka at seznam dot cz
2010-07-29 1:28 ` pinskia at gcc dot gnu dot org
@ 2010-07-29 9:40 ` rguenth at gcc dot gnu dot org
2010-09-02 11:13 ` rguenth at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-29 9:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2010-07-29 09:40 -------
Confirmed. In the original code b doesn't overflow.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-07-29 09:40:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/45122] [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution
2010-07-29 1:13 [Bug tree-optimization/45122] New: [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-07-29 9:40 ` rguenth at gcc dot gnu dot org
@ 2010-09-02 11:13 ` rguenth at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-02 11:13 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45122
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-09-02 11:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-29 1:13 [Bug tree-optimization/45122] New: [4.6 Regression] -funsafe-loop-optimizations causes FAIL: gcc.c-torture/execute/pr27285.c execution zsojka at seznam dot cz
2010-07-29 1:25 ` [Bug tree-optimization/45122] " zsojka at seznam dot cz
2010-07-29 1:28 ` pinskia at gcc dot gnu dot org
2010-07-29 9:40 ` rguenth at gcc dot gnu dot org
2010-09-02 11:13 ` rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).