Commit c7885b85 by Martin Liska Committed by Martin Liska

Fix emission of exception dispatch (PR middle-end/82154).

2017-09-13  Martin Liska  <mliska@suse.cz>

	PR middle-end/82154
	* stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
	CASE_HIGH is NULL_TREE.
2017-09-13  Martin Liska  <mliska@suse.cz>

	PR middle-end/82154
	* g++.dg/torture/pr82154.C: New test.

From-SVN: r252728
parent 97e63e12
2017-09-13 Martin Liska <mliska@suse.cz>
PR middle-end/82154
* stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
CASE_HIGH is NULL_TREE.
2017-09-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
......
......@@ -1063,8 +1063,10 @@ expand_sjlj_dispatch_table (rtx dispatch_index,
for (int i = ncases - 1; i >= 0; --i)
{
tree elt = dispatch_table[i];
case_list.safe_push (simple_case_node (CASE_LOW (elt),
CASE_HIGH (elt),
tree high = CASE_HIGH (elt);
if (high == NULL_TREE)
high = CASE_LOW (elt);
case_list.safe_push (simple_case_node (CASE_LOW (elt), high,
CASE_LABEL (elt)));
}
......
2017-09-13 Martin Liska <mliska@suse.cz>
PR middle-end/82154
* g++.dg/torture/pr82154.C: New test.
2017-09-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/61362
......
// { dg-do compile }
// { dg-additional-options "-Wno-deprecated" }
namespace a {
int b;
class c
{
};
}
class g
{
public:
g ();
};
using a::b;
class d
{
public:
d ();
void e ();
};
class f
{
d
i ()
{
static d j;
}
int *k () throw (a::c);
};
int *f::k () throw (a::c)
{
static g h;
i ();
int l = 2;
while (l)
{
--l;
try
{
operator new (b);
}
catch (a::c)
{
}
}
i ().e ();
}
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