--- Comment #13 from ppr at melexis dot com 2008-09-18 12:15 ---
(In reply to comment #12)
> Note you can do the same as AVR does - force flag_delete_null_pointer_checks
> to
> zero:
>
Thanks for the hint, I'll use it!
Plamen
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37569
--- Comment #11 from ppr at melexis dot com 2008-09-18 10:57 ---
(In reply to comment #10)
This workaround doesn't work with GCC 3.4.3 (the base for our 16-bit port). It
does work with the latest GCC4.3 though.
Anyway, thanks for your support, and for explaining the reasons behin
--- Comment #9 from ppr at melexis dot com 2008-09-18 10:20 ---
(In reply to comment #8)
> I think this code is invalid. I seem to recall the argument that it's
> undefined behavior to increment or decrement a pointer to 0.
Well, the pointer is not NULL initially
--- Comment #6 from ppr at melexis dot com 2008-09-18 08:22 ---
(In reply to comment #5)
> another vrp bug? -fno-tree-vrp helps.
>
Yes, -fno-tree-vrp does help
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37569
--- Comment #4 from ppr at melexis dot com 2008-09-18 07:58 ---
The problem seems to be related with the i pointer reaching 0. If the loop
condition is e.g. "while ( i != 2 )" everything is ok.
The same if the "sum = sum + *(i)" is replaced e.g. with "sum = s
--- Comment #3 from ppr at melexis dot com 2008-09-18 07:53 ---
Created an attachment (id=16354)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16354&action=view)
The compiler output
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37569
--- Comment #2 from ppr at melexis dot com 2008-09-18 07:53 ---
Created an attachment (id=16353)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16353&action=view)
The produced assembler source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37569
--- Comment #1 from ppr at melexis dot com 2008-09-18 07:52 ---
Created an attachment (id=16352)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16352&action=view)
preprocessed source of the test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37569
melexis dot com
GCC host triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37569