Fix the structure initializer detection in UBSan. 41/99941/3
authorSlava Barinov <v.barinov@samsung.com>
Thu, 24 Nov 2016 12:09:01 +0000 (15:09 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 30 Nov 2016 11:12:57 +0000 (03:12 -0800)
commit483c76fbf8da6e4fce46894dd03f146e008b9f3a
tree5b0d0825fff30dacb2b911ee7cc8947933a1c37e
parenta305b1d31e7d8b4a254cb148a1126efd9bbb75c9
Fix the structure initializer detection in UBSan.

The fix introduced in caea219 lacked the check if symbol has assembler name and this
caused ICE on during object-size-9.C test compilation.

* gcc/fold-const.c (tree_single_nonzero_warnv_p): Check if local object
has assembler name before the WEAK check.

Change-Id: If9c104fd9f1b84f3f54cf4fa28ad95666a19295c
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
gcc/fold-const.c