Re: Fix -Wstringop-overflow ICE with references (PR middle-end/78750)

2016-12-09 Thread Richard Biener
On December 9, 2016 4:27:19 PM GMT+01:00, Marek Polacek wrote: >The attached test crashed because we wound up with an SSA_NAME of >a reference type in get_range_info which has > > gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name))); > >I think this could be fixed by treating "char &" the same as "ch

Fix -Wstringop-overflow ICE with references (PR middle-end/78750)

2016-12-09 Thread Marek Polacek
The attached test crashed because we wound up with an SSA_NAME of a reference type in get_range_info which has gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name))); I think this could be fixed by treating "char &" the same as "char *" in check_sizes (the POINTER_TYPE_P macro handles both pointers/re