The included test case is cut down from libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.cc and ICE's when compiled with '-milp32 -O1 -g -std=gnu++0x' on IA64 HP-UX. It works in 64 bit mode and it works with -O0. The ICE is:
x.C: In function 'int main()': x.C:16:1: internal compiler error: in loc_cmp, at var-tracking.c:2461 The C++ test case is: typedef enum memory_order { memory_order_acquire, memory_order_acq_rel, memory_order_seq_cst } memory_order; typedef struct __atomic_flag_base { bool _M_i; } __atomic_flag_base; struct atomic_flag : public __atomic_flag_base { atomic_flag(bool __i) : __atomic_flag_base({ __i }) { } void clear(memory_order __m = memory_order_seq_cst) volatile { __sync_lock_release(&_M_i); if (__m != memory_order_acquire && __m != memory_order_acq_rel) __sync _synchronize(); } }; int main() { atomic_flag f = { false }; f.clear(); } -- Summary: VTA: ICE in loc_cmp. Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sje at cup dot hp dot com GCC build triplet: ia46-hp-hpux11.23 GCC host triplet: ia64-hp-hpux11.23 GCC target triplet: ia64-hp-hpux11.23 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41801