mirror of git://gcc.gnu.org/git/gcc.git
re PR middle-end/55263 (ICE: pre_and_rev_post_order_compute, at cfganal.c:875 with -O -fgcse-after-reload -fnon-call-exceptions)
gcc/ PR middle-end/55263 * postreload.c (rest_of_handle_postreload): With non-call exceptions, if edges are purged call cleanup_cfg to remove unreachable blocks. testsuite/ PR middle-end/55263 * g++.dg/pr55263.C: New test. From-SVN: r193412
This commit is contained in:
parent
18abab9fee
commit
159520acf7
|
|
@ -1,3 +1,9 @@
|
||||||
|
2012-11-11 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR middle-end/55263
|
||||||
|
* postreload.c (rest_of_handle_postreload): With non-call exceptions,
|
||||||
|
if edges are purged call cleanup_cfg to remove unreachable blocks.
|
||||||
|
|
||||||
2012-11-11 Sandra Loosemore <sandra@codesourcery.com>
|
2012-11-11 Sandra Loosemore <sandra@codesourcery.com>
|
||||||
|
|
||||||
* doc/extend.texi: Copy-edit to use "built-in function" instead
|
* doc/extend.texi: Copy-edit to use "built-in function" instead
|
||||||
|
|
|
||||||
|
|
@ -2289,8 +2289,9 @@ rest_of_handle_postreload (void)
|
||||||
reload_cse_regs (get_insns ());
|
reload_cse_regs (get_insns ());
|
||||||
/* Reload_cse_regs can eliminate potentially-trapping MEMs.
|
/* Reload_cse_regs can eliminate potentially-trapping MEMs.
|
||||||
Remove any EH edges associated with them. */
|
Remove any EH edges associated with them. */
|
||||||
if (cfun->can_throw_non_call_exceptions)
|
if (cfun->can_throw_non_call_exceptions
|
||||||
purge_all_dead_edges ();
|
&& purge_all_dead_edges ())
|
||||||
|
cleanup_cfg (0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-11-11 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR middle-end/55263
|
||||||
|
* g++.dg/pr55263.C: New test.
|
||||||
|
|
||||||
2012-11-11 Martin Jambor <mjambor@suse.cz>
|
2012-11-11 Martin Jambor <mjambor@suse.cz>
|
||||||
|
|
||||||
PR tree-optimization/55238
|
PR tree-optimization/55238
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-c -O -fgcse-after-reload -fnon-call-exceptions" } */
|
||||||
|
template < typename _Tp > class new_allocator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef _Tp pointer;
|
||||||
|
template < typename _Tp1 > struct rebind
|
||||||
|
{
|
||||||
|
typedef new_allocator < _Tp1 > other;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
template < typename > class allocator;
|
||||||
|
|
||||||
|
template < typename _Alloc > struct __alloc_traits
|
||||||
|
{
|
||||||
|
typedef typename _Alloc::pointer pointer;
|
||||||
|
template < typename _Tp > struct rebind
|
||||||
|
{
|
||||||
|
typedef typename _Alloc::template rebind < _Tp >::other other;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
template < typename _Tp, typename _Alloc > struct _Vector_base
|
||||||
|
{
|
||||||
|
typedef
|
||||||
|
typename
|
||||||
|
__alloc_traits < _Alloc >::template rebind < _Tp >::other _Tp_alloc_type;
|
||||||
|
typedef typename __alloc_traits < _Tp_alloc_type >::pointer pointer;
|
||||||
|
struct _Vector_impl
|
||||||
|
{
|
||||||
|
pointer _M_start;
|
||||||
|
pointer _M_end_of_storage;
|
||||||
|
};
|
||||||
|
|
||||||
|
~_Vector_base ();
|
||||||
|
_Vector_impl _M_impl;
|
||||||
|
};
|
||||||
|
|
||||||
|
template < typename _Tp, typename _Alloc = allocator < _Tp > >class vector:
|
||||||
|
_Vector_base < _Tp, _Alloc >
|
||||||
|
{
|
||||||
|
typedef _Vector_base < _Tp, _Alloc > _Base;
|
||||||
|
public:
|
||||||
|
typedef typename _Base::pointer pointer;
|
||||||
|
vector ():
|
||||||
|
_Base ()
|
||||||
|
{
|
||||||
|
_M_erase_at_end (this->_M_impl._M_start);
|
||||||
|
}
|
||||||
|
void _M_erase_at_end (pointer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template < typename T > class clear_alloc:
|
||||||
|
public new_allocator < T >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
void
|
||||||
|
foo ()
|
||||||
|
{
|
||||||
|
new vector < int, clear_alloc < int > >;
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue