mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-16 03:10:28 +08:00
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
This commit is contained in:
parent
0b7e34d7dd
commit
5c3ec539b7
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
16
gcc/testsuite/g++.dg/tree-ssa/pr41275.C
Normal file
16
gcc/testsuite/g++.dg/tree-ssa/pr41275.C
Normal file
@ -0,0 +1,16 @@
|
||||
// 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user