1 // PR optimization/11646
2 // Origin: <nick@ilm.com>
4 // This used to fail because the compiler inadvertently cleared
5 // the EDGE_ABNORMAL flag on a EDGE_EH edge and didn't delete
6 // unreachable blocks after CSE.
9 // { dg-options "-O -fgcse -fnon-call-exceptions" }
18 ~allocator() throw() {}
21 struct _Vector_alloc_base
23 _Vector_alloc_base(const allocator& __a) {}
24 allocator _M_data_allocator;
25 struct C *_M_start, *_M_end_of_storage;
26 void _M_deallocate(struct C* __p, unsigned int __n) {}
29 struct _Vector_base : _Vector_alloc_base
31 _Vector_base(const allocator& __a) : _Vector_alloc_base(__a) { }
32 ~_Vector_base() { _M_deallocate(0, _M_end_of_storage - _M_start); }
35 struct vector : _Vector_base
37 vector(const allocator& __a = allocator()) : _Vector_base(__a) {}
38 struct C& operator[](unsigned int __n) { return *_M_start; }
44 A operator-(const A &) const;
45 const A& operator=(float) const;
53 float f(const A& a, B& b)
58 float d = (aa - a).l();
59 if (d > b.d()) aa = 0;