https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69841
James Greenhalgh <jgreenhalgh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alan.lawrence at arm dot com, | |jakub at gcc dot gnu.org, | |rguenth at gcc dot gnu.org --- Comment #3 from James Greenhalgh <jgreenhalgh at gcc dot gnu.org> --- I'm still confused by this. After coming out of the front end I checked the DECL_ALIGN for each field of each of the parameters being passed to this function. I see: ---- f1.ii std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) (struct _Rb_tree * const this (decl alignment: 32), struct const_iterator __pos Fields: _M_node (decl alignment: 32) _Rb_tree_const_iterator (decl alignment: 8) value_type (decl alignment: 8) reference (decl alignment: 32) pointer (decl alignment: 32) iterator (decl alignment: 8) iterator_category (decl alignment: 8) difference_type (decl alignment: 32) _Self (decl alignment: 8) _Base_ptr (decl alignment: 32) _Link_type (decl alignment: 32) (decl alignment: 32, max field alignment: 32), const struct piecewise_construct_t & __args#0 (decl alignment: 32), struct tuple & __args#1 (decl alignment: 32), struct tuple & __args#2 (decl alignment: 32)) f2.ii std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) (struct _Rb_tree * const this (decl alignment: 32), struct const_iterator __pos Fields: _M_node (decl alignment: 32) _Rb_tree_const_iterator (decl alignment: 8) value_type (decl alignment: 64) reference (decl alignment: 32) pointer (decl alignment: 32) iterator (decl alignment: 32) iterator_category (decl alignment: 8) difference_type (decl alignment: 32) _Self (decl alignment: 8) _Base_ptr (decl alignment: 32) _Link_type (decl alignment: 32) (decl alignment: 32, max field alignment: 64), const struct piecewise_construct_t & __args#0 (decl alignment: 32), struct tuple & __args#1 (decl alignment: 32), struct tuple & __args#2 (decl alignment: 32)) --- That is to say, after gimplification we've already decided that the alignment of the value_type field of the std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator parameter to std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique in f2.ii is 64, whereas in f1.ii we don't have any extra alignment information. I know nothing about the C++ front-end and how we could end up in this situation. I can understand why, given this, we would generate the code we do for ARM.