diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-02 10:10:45 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-02 16:30:43 +0930 |
commit | 4dda287bf650e908271a1d36ee1fca6dece4eb16 (patch) | |
tree | 13908453e9456a42249ce6d2137fe7894dddf38f /gas/config/obj-macho.c | |
parent | 251150adb1ec4315f2ec66aceb289cc0ccbf7438 (diff) | |
download | gdb-4dda287bf650e908271a1d36ee1fca6dece4eb16.zip gdb-4dda287bf650e908271a1d36ee1fca6dece4eb16.tar.gz gdb-4dda287bf650e908271a1d36ee1fca6dece4eb16.tar.bz2 |
ubsan: obj-macho.c:503 left shift cannot be represented
* config/obj-macho.c (obj_mach_o_zerofill): Correct type of
constant shifted left.
Diffstat (limited to 'gas/config/obj-macho.c')
-rw-r--r-- | gas/config/obj-macho.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/obj-macho.c b/gas/config/obj-macho.c index 4b54a66..c3ce999 100644 --- a/gas/config/obj-macho.c +++ b/gas/config/obj-macho.c @@ -500,7 +500,7 @@ obj_mach_o_zerofill (int ignore ATTRIBUTE_UNUSED) } size = exp.X_add_number; - size &= ((offsetT) 2 << (stdoutput->arch_info->bits_per_address - 1)) - 1; + size &= ((valueT) 2 << (stdoutput->arch_info->bits_per_address - 1)) - 1; if (exp.X_add_number != size || !exp.X_unsigned) { as_warn (_("size (%ld) out of range, ignored"), |