https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
Sebastian Andrzej Siewior changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
--- Comment #10 from Mikael Pettersson ---
You're invoking undefined behaviour due to overflow in signed integer
arithmetic.
Running it after compiling with -fsanitize=undefined produces:
petite.c:391:28: runtime error: signed integer overflow:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
--- Comment #9 from Sebastian Andrzej Siewior ---
I added the complete function including its callers.
$ gcc -g -o petite petite.c -Wall -O2
$ ./petite
447=> 5
452=> 5
447=> 5
452=> 5
447=> 0
452=> 0
Segmentation fault
---
$ gcc -g -o petite pet
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
--- Comment #8 from Sebastian Andrzej Siewior ---
Created attachment 34305
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34305&action=edit
self-contained complete TC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
--- Comment #7 from Mikael Pettersson ---
The testcases don't build due to linkage errors. Please submit a
self-contained and preferably minimized testcase.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
Sebastian Andrzej Siewior changed:
What|Removed |Added
Known to work||4.7.2
--- Comment #6 from Se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
Sebastian Andrzej Siewior changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
Resoluti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
--- Comment #4 from Sebastian Andrzej Siewior ---
Created attachment 34276
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34276&action=edit
tc-static function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
Sebastian Andrzej Siewior changed:
What|Removed |Added
Attachment #34272|0 |1
is obsolete|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
--- Comment #2 from Sebastian Andrzej Siewior ---
It seems exit(0) is dropped with -O1 -ftree-vrp.
(In reply to Andreas Schwab from comment #1)
> This condition is true if backsize == 0:
Ehm, yes. The Code is:
--
printf("bufsz: %u backsize: %d\
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294
Andreas Schwab changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
11 matches
Mail list logo