This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][OBVIOUS] Fix wrong usage of dump_printf_loc (PR tree-optimization/90416).
- From: Martin Liška <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, David Malcolm <dmalcolm at redhat dot com>, richard dot sandiford at arm dot com
- Date: Mon, 13 May 2019 13:20:16 +0200
- Subject: Re: [PATCH][OBVIOUS] Fix wrong usage of dump_printf_loc (PR tree-optimization/90416).
- References: <cb1d05bb-3022-df7e-4f0f-08b7d98da831@suse.cz> <mpt1s12mwjt.fsf@arm.com>
On 5/13/19 1:19 PM, Richard Sandiford wrote:
> Martin Liška <mliska@suse.cz> writes:
>> Hi.
>>
>> dump_printf_loc is a variadic function and the usafe in tree-vect-stmts.c
>> is wrongly passing 2nd part of the string format as a first variadic argument.
>> That's why I saw such a strange crashes.
>>
>> I'm going to install the patch as soon as it finishes tests.
>
> Good catch! Mind applying to gcc-9-branch too?
Thanks.
I'm going to backport that!
Martin
>
> Thanks,
> Richard
>
>>
>> Thanks,
>> Martin
>>
>> gcc/ChangeLog:
>>
>> 2019-05-13 Martin Liska <mliska@suse.cz>
>>
>> PR tree-optimization/90416
>> * tree-vect-stmts.c (vect_check_load_store_mask): Concatenate
>> string instead of passing the second part as va_arg argument.
>> ---
>> gcc/tree-vect-stmts.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
>> diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
>> index ced4264722c..4ed60808a65 100644
>> --- a/gcc/tree-vect-stmts.c
>> +++ b/gcc/tree-vect-stmts.c
>> @@ -2592,7 +2592,7 @@ vect_check_load_store_mask (stmt_vec_info stmt_info, tree mask,
>> {
>> if (dump_enabled_p ())
>> dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
>> - "vector mask type %T",
>> + "vector mask type %T"
>> " does not match vector data type %T.\n",
>> mask_vectype, vectype);
>>