* (Serious) sparc/solaris EH problem
@ 1997-11-28 3:59 Teemu Torma
0 siblings, 0 replies; only message in thread
From: Teemu Torma @ 1997-11-28 3:59 UTC (permalink / raw)
To: egcs
I think the following problem should be corrected before the release.
If compiled with -O, i is not zero as one would expect. The problem
does not happen if using sjlj exceptions, or if not optimizing.
I suspect that the register gets lost somehow.
$ c++ -O eh.cc
$ ./a.out
1: i = 0
2: i = 1
3: i = 1
Teemu
--------------------------------------------------------------------
#include <stdio.h>
int bar ()
{
throw 100;
}
main ()
{
int i = 0;
try
{
printf ("1: i = %d\n", i);
i = bar ();
}
catch (...)
{
printf ("2: i = %d\n", i);
}
printf ("3: i = %d\n", i);
return i;
}
---------------------------------------------------------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-11-28 3:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-28 3:59 (Serious) sparc/solaris EH problem Teemu Torma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).