Message ID | cb1d05bb-3022-df7e-4f0f-08b7d98da831@suse.cz |
---|---|
State | New |
Headers | show |
Series | [OBVIOUS] Fix wrong usage of dump_printf_loc (PR tree-optimization/90416). | expand |
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, 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); >
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); >>
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);