Commit 5c3ec539 by Michael Matz Committed by Michael Matz

re PR c++/41275 (ICE: expand_expr_real_1, at expr.c:8416)

	PR middle-end/41275
	* tree-inline.c (remap_decls): Don't put DECL_EXTERNAL decls
	on the local_decls list.

testsuite/
	* g++.dg/tree-ssa/pr41275.C: New test.

From-SVN: r151631
parent 0b7e34d7
2009-09-11 Michael Matz <matz@suse.de>
PR middle-end/41275
* tree-inline.c (remap_decls): Don't put DECL_EXTERNAL decls
on the local_decls list.
2009-09-11 Alexandre Oliva <aoliva@redhat.com>
PR debug/41276
......
2009-09-11 Michael Matz <matz@suse.de>
PR middle-end/41275
* g++.dg/tree-ssa/pr41275.C: New test.
2009-09-11 Janus Weil <janus@gcc.gnu.org>
PR fortran/41242
......
// PR middle-end/41275
// { dg-do compile }
// { dg-options "-O2" }
// this used to ICE
struct ErrmsgWindow
{
virtual ~ErrmsgWindow()
{
extern int _switch_mode_errorstr;
_switch_mode_errorstr = 42;
}
};
void ShowErrorMessage(void)
{
ErrmsgWindow w;
}
......@@ -536,6 +536,7 @@ remap_decls (tree decls, VEC(tree,gc) **nonlocalized_list, copy_body_data *id)
if (can_be_nonlocal (old_var, id))
{
if (TREE_CODE (old_var) == VAR_DECL
&& ! DECL_EXTERNAL (old_var)
&& (var_ann (old_var) || !gimple_in_ssa_p (cfun)))
cfun->local_decls = tree_cons (NULL_TREE, old_var,
cfun->local_decls);
......
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