Commit 3d9fbb9a by Richard Guenther Committed by Richard Biener

re PR middle-end/37284 (ICE on valid code with -fstrict-aliasing)

2008-09-18  Richard Guenther  <rguenther@suse.de>

	PR middle-end/37284
	* tree-cfg.c (remove_useless_stmts_1): Remove
	GIMPLE_CHANGE_DYNAMIC_TYPE if not optimizing.

	* g++.dg/tree-ssa/pr37284.C: New testcase.

From-SVN: r140453
parent 35f2d8ef
2008-09-18 Richard Guenther <rguenther@suse.de>
PR middle-end/37284
* tree-cfg.c (remove_useless_stmts_1): Remove
GIMPLE_CHANGE_DYNAMIC_TYPE if not optimizing.
2008-09-18 Nick Clifton <nickc@redhat.com> 2008-09-18 Nick Clifton <nickc@redhat.com>
* config/frv/frv.h (IRA_COVER_CLASSES): Define. * config/frv/frv.h (IRA_COVER_CLASSES): Define.
......
2008-09-18 Richard Guenther <rguenther@suse.de>
PR middle-end/37284
* g++.dg/tree-ssa/pr37284.C: New testcase.
2008-09-18 Daniel Kraft <d@domob.eu> 2008-09-18 Daniel Kraft <d@domob.eu>
PR fortran/37507 PR fortran/37507
......
/* { dg-do compile } */
/* { dg-options "-fstrict-aliasing" } */
void* operator new(__SIZE_TYPE__, void* __p) throw()
{
return __p;
}
class PatternDriverTop;
typedef const PatternDriverTop* _Tp;
void construct(_Tp* __p, const _Tp& __val)
{
::new((void *)__p) _Tp(__val);
}
...@@ -1997,6 +1997,18 @@ remove_useless_stmts_1 (gimple_stmt_iterator *gsi, struct rus_data *data) ...@@ -1997,6 +1997,18 @@ remove_useless_stmts_1 (gimple_stmt_iterator *gsi, struct rus_data *data)
} }
break; break;
case GIMPLE_CHANGE_DYNAMIC_TYPE:
/* If we do not optimize remove GIMPLE_CHANGE_DYNAMIC_TYPE as
expansion is confused about them and we only remove them
during alias computation otherwise. */
if (!optimize)
{
data->last_was_goto = false;
gsi_remove (gsi, false);
break;
}
/* Fallthru. */
default: default:
data->last_was_goto = false; data->last_was_goto = false;
gsi_next (gsi); gsi_next (gsi);
......
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