--- Comment #14 from rguenth at gcc dot gnu dot org 2007-03-07 21:22
---
This is why we have this bug -- because loop unrolling creates possibly
unreachable code with out-of-bounds array access.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31058
--- Comment #13 from pinskia at gcc dot gnu dot org 2007-03-07 21:22
---
Actually comment #3 shows this warning is not easy to avoid at all and should
not be turned on with -Wall at all.
I still had allways said it should not be included in -Wall.
--
http://gcc.gnu.org/bugzilla/sh
--- Comment #12 from pinskia at gcc dot gnu dot org 2007-03-07 21:21
---
(In reply to comment #11)
> Sorry, but I don't agree a bit with you. It doesn't have as much false
> positives
> as other warnings in -Wall.
Actually if you read the documention for -Wall, it says enable warnings
--- Comment #11 from rguenth at gcc dot gnu dot org 2007-03-07 20:54
---
Sorry, but I don't agree a bit with you. It doesn't have as much false
positives
as other warnings in -Wall. And I think a warning for the testcase in comment
#3
is ok -- the code looks very suspicious. Also the
--- Comment #10 from pinskia at gcc dot gnu dot org 2007-03-07 20:37
---
> well, the unrolled body is generated code, it could set TREE_NO_WARNING (for
> example). or it could avoid unrolling if its not a flex array.
Except it cannot tell sorry, this is exactly the same issue as the b
--- Comment #9 from mueller at gcc dot gnu dot org 2007-03-07 11:34 ---
well, the unrolled body is generated code, it could set TREE_NO_WARNING (for
example). or it could avoid unrolling if its not a flex array.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31058
--- Comment #8 from rakdver at atrey dot karlin dot mff dot cuni dot cz
2007-03-07 11:02 ---
Subject: Re: bogus array overflow warnings in unrolled loops
> I don't think this is the same testcase. you will get any warning in this
> case,
> because the compiler cannot determine that i
--- Comment #7 from mueller at gcc dot gnu dot org 2007-03-07 10:59 ---
I don't think this is the same testcase. you will get any warning in this case,
because the compiler cannot determine that it is supposed to be dead code.
--
mueller at gcc dot gnu dot org changed:
W