This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50188] New: Optimizer doesn't take into account, that longjmp could lead to loops, which causes illegal code transformations.
- From: "michael.v.zolotukhin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Aug 2011 15:54:00 +0000
- Subject: [Bug tree-optimization/50188] New: Optimizer doesn't take into account, that longjmp could lead to loops, which causes illegal code transformations.
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50188
Bug #: 50188
Summary: Optimizer doesn't take into account, that longjmp
could lead to loops, which causes illegal code
transformations.
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: michael.v.zolotukhin@gmail.com
Created attachment 25104
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25104
Bug reproducer.
Setjmp/longjmp could form loops, like following:
int i = 0;
(void) setjmp (env);
i++;
if (i < 10)
longjmp (env, 0);
Optimizer removes check 'if(i<10)' and 'i++' (seemingly, as a dead code). In
this example after such transformations the loop becomes infinite.
- Follow-Ups:
- [Bug tree-optimization/50188] Optimizer doesn't take into account, that longjmp could lead to loops, which causes illegal code transformations.
- From: hjl.tools at gmail dot com
- [Bug tree-optimization/50188] Optimizer doesn't take into account, that longjmp could lead to loops, which causes illegal code transformations.
- From: pinskia at gcc dot gnu.org
- [Bug tree-optimization/50188] Optimizer doesn't take into account, that longjmp could lead to loops, which causes illegal code transformations.
- From: pinskia at gcc dot gnu.org
- [Bug tree-optimization/50188] Optimizer doesn't take into account, that longjmp could lead to loops, which causes illegal code transformations.
- From: michael.v.zolotukhin at gmail dot com
- [Bug tree-optimization/50188] Optimizer doesn't take into account, that longjmp could lead to loops, which causes illegal code transformations.
- From: jakub at gcc dot gnu.org