Commit 1c86160a by Richard Guenther Committed by Richard Biener

re PR middle-end/49394 (libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc…

re PR middle-end/49394 (libstdc++-v3/testsuite/30_threads/lock_guard/cons/1.cc FAILs with -fipa-pta -fnon-call-exceptions)

2011-06-27  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/49394
	* passes.c (execute_one_pass): Restore current_pass after
	applying IPA transforms.

	* g++.dg/torture/pr49394.C: New testcase.

From-SVN: r175532
parent 5da49a9d
2011-06-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49394
* passes.c (execute_one_pass): Restore current_pass after
applying IPA transforms.
2011-06-27 Kai Tietz <ktietz@redhat.com>
* tree-ssa-math-opts.c (do_shift_rotate): Zero bits
......
......@@ -2030,6 +2030,8 @@ execute_one_pass (struct opt_pass *pass)
do_per_function (apply_ipa_transforms, (void *)&applied);
if (applied)
cgraph_remove_unreachable_nodes (true, dump_file);
/* Restore current_pass. */
current_pass = pass;
}
if (!quiet_flag && !cfun)
......
2011-06-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49394
* g++.dg/torture/pr49394.C: New testcase.
2011-06-27 Kai Tietz <ktietz@redhat.com>
* gcc.dg/optimize-bswapdi-2.c: New test.
......
// { dg-do run }
// { dg-options "-fipa-pta -fnon-call-exceptions" }
struct Mutex
{
bool locked;
~Mutex ()
{
if (locked)
throw 0;
}
void lock ()
{
locked = true;
}
void unlock ()
{
if (!locked)
throw 0;
locked = false;
}
};
struct lock_guard
{
Mutex *m;
lock_guard (Mutex *m) : m(m)
{
}
~lock_guard ()
{
m->unlock ();
}
};
int
main ()
{
Mutex m;
m.lock ();
try
{
lock_guard l (&m);
}
catch ( ...)
{
__builtin_abort ();
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment