GCC Bugzilla – Attachment 30431 Details for
Bug 56982
[4.8 Regression] Bad optimization with setjmp()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
another example of wrong compilation
jmp.c (text/plain), 363 bytes, created by
Bernd Edlinger
on 2013-07-02 22:26:34 UTC
(
hide
)
Description:
another example of wrong compilation
Filename:
MIME Type:
Creator:
Bernd Edlinger
Created:
2013-07-02 22:26:34 UTC
Size:
363 bytes
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <setjmp.h> > >static jmp_buf env; > >int f() >{ > auto int a = 0; > > int x = setjmp(env); > if (x==0) { > a++; > printf("x=%d, a=%d\n",x,a); > longjmp(env,1); > } > printf("x=%d, a=%d\n",x,a); > return a; > >} > >int main(int argc, char** argv) >{ > int a = f(); > printf("a=%d\n",a); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 56982
:
29883
|
29884
|
29889
| 30431