This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[971105] Core dump with exceptions


The following code dumps core on linux when compiled *without* optimization.

struct foo { };
int f(int a, int b)
{
	if (b == 0)
		throw foo();
	return a / b;
}
int main()
{
	try {
		f(0, 0);
		return 0;
	} catch (foo x) {
		return 1;
	}
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]