[SH][committed] Fix cset_zero pattern regressions

2016-09-25 Thread Oleg Endo
Hi, This fixes a fallout that actually goes back to 5.0 but went unnoticed. The costs for movt and movrt type of insns were not correctly reported and ifcvt thus made some bad choices for SH.  A new cset_zero pattern variant is also required to fix the matching for some recent changes in the middl

[PATCH] Make -Wint-in-bool-context warn on suspicious shift ops

2016-09-25 Thread Bernd Edlinger
Hi! This patch makes -Wint-in-bool-context warn on suspicious integer left shifts, when the integer is signed, which is most likely some kind of programming error, for instance using "<<" instead of "<". The warning is motivated by the fact, that an overflow on integer shift left is undefined be

[PATCH, PR77558] Remove RECORD_TYPE special-casing in std_canonical_va_list_type

2016-09-25 Thread Tom de Vries
Hi, this patch fixes PR77558, an ice-on-invalid-code 6/7 regression. The fix for PR71602 introduced the invalid-code test-case c-c++-common/va-arg-va-list-type.c: ... __builtin_va_list *pap; void fn1 (void) { __builtin_va_arg (pap, double); /* { dg-error "first argument to 'va_arg' not of

[PATCH] Make CHECKING_P a boolean flag again

2016-09-25 Thread Bernd Edlinger
Hi! Currently CHECKING_P is not a boolean flag but a ternary option. However the _P in the name implies it is a boolean. That should be cleaned up again IMHO. So this patch splits CHECKING_P into CHECKING_P and a new flag ENABLE_EXTRA_CHECKING. All uses of CHECKING_P are actually of the form

Re: [PATCH 6/17][ARM] Add data processing intrinsics for float16_t.

2016-09-25 Thread Christophe Lyon
Hi Matthew, On 27 July 2016 at 15:59, Ramana Radhakrishnan wrote: > On Tue, May 17, 2016 at 3:31 PM, Matthew Wahab > wrote: >> The ACLE specifies a number of intrinsics for manipulating vectors >> holding values in most of the integer and floating point type. These >> include 16-bit integer typ

[PATCH] x86_64: fix 'gather' avx2 builtin names

2016-09-25 Thread Sergei Trofimovich
From: Sergei Trofimovich Today I traced AVX2 optimisation bug in gcc and distilled it down to '__builtin_ia32_gatheraltdiv4si256' generated by gcc. When I attempted to use this builtin directly in a simple program gcc refused to recognise it as known: #include void a (void) { __builti

[v3 PATCH] PR libstdc++/77717

2016-09-25 Thread Ville Voutilainen
Tested on Linux-x64. 2016-09-25 Ville Voutilainen PR libstdc++/77717 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc: Fix an out-of-bounds access. diff --git a/libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/1.cc b/libstdc++-v3/t

parallel/algo.h cleanup

2016-09-25 Thread François Dumont
Hi Trivial patch to cleanup parallel/algo.h by generalizing usage of std::__iterator_category. * include/parallel/algo.h: Generalize usage of std::__iterator_category. Adjust whitespaces. Tested under Linux x86_64 parallel mode. François Index: include/parallel/algo.h

Re: [PATCH 4/4][Ada,DJGPP] Ada support for DJGPP

2016-09-25 Thread Arnaud Charlet
> int > __gnat_get_maximum_file_name_length (void) > { > +#if defined (__DJGPP__) > + return (_use_lfn(".")) ? -1 : 8; > +#else >return -1; > +#endif > } Is the above change really necessary? Would be nice to get rid of this extra code. The rest looks OK to me. Arno

Re: [PATCH] x86_64: fix 'gather' avx2 builtin names

2016-09-25 Thread Jakub Jelinek
On Sun, Sep 25, 2016 at 02:48:19PM +0100, Sergei Trofimovich wrote: > From: Sergei Trofimovich > > Today I traced AVX2 optimisation bug in gcc and > distilled it down to '__builtin_ia32_gatheraltdiv4si256' > generated by gcc. > > When I attempted to use this builtin directly > in a simple progra

[Committed] PR fortran/77694

2016-09-25 Thread Steve Kargl
Committed as "obvious" even though thomas OK patch in bugzilla audit trail. 2016-09-25 Steven G. Kargl PR fortran/77694 * frontend-passes.c (optimize_binop_array_assignment): Check pointer for NULL. 2016-09-25 Steven G. Kargl PR fortran/77694 * gfor

Re: [PATCH 4/4][Ada,DJGPP] Ada support for DJGPP

2016-09-25 Thread Andris Pavenis
On 09/25/2016 07:25 PM, Arnaud Charlet wrote: int __gnat_get_maximum_file_name_length (void) { +#if defined (__DJGPP__) + return (_use_lfn(".")) ? -1 : 8; +#else return -1; +#endif } Is the above change really necessary? Would be nice to get rid of this extra code. The rest looks OK

Re: [PATCH] x86_64: fix 'gather' avx2 builtin names

2016-09-25 Thread Sergei Trofimovich
On Sun, 25 Sep 2016 19:01:14 +0200 Jakub Jelinek wrote: > On Sun, Sep 25, 2016 at 02:48:19PM +0100, Sergei Trofimovich wrote: > > From: Sergei Trofimovich > > > > Today I traced AVX2 optimisation bug in gcc and > > distilled it down to '__builtin_ia32_gatheraltdiv4si256' > > generated by gcc. >

Re: [PATCH 4/4][Ada,DJGPP] Ada support for DJGPP

2016-09-25 Thread Arnaud Charlet
> >Is the above change really necessary? Would be nice to get rid of this > >extra code. The rest looks OK to me. > It is required for support of environment when LFN support is either > not available or disabled for some reason (for example FreeDOS > without LFN support loaded). Does it matter fo

[Committed] PR fortran/77429

2016-09-25 Thread Steve Kargl
Committed as obvious. 2016-09-25 Steven G. Kargl PR fortran/77429 * dependency.c (gfc_check_dependency): Convert gcc_assert() to a conditional and possible call to gfc_internal_error(). 2016-09-25 Steven G. Kargl PR fortran/77429 * gfortran.dg/p

[v3 PATCH] PR libstdc++/77727

2016-09-25 Thread Ville Voutilainen
Tested on Linux-x64. 2016-09-26 Ville Voutilainen PR libstdc++/77727 * include/std/optional (optional(const optional<_Up>&)): Default-initialize the base and use emplace. (optional(optional<_Up>&&)): Likewise. * testsuite/20_util/optional/cons/77727.cc: New. diff --git a/li

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-25 Thread Yuan, Pengfei
Hi, May I ask if there is any decision? Regards, Yuan, Pengfei > > > I also like a new param better as it avoids a new magic constant and > > > makes playing with > > > it easier (your patch removes the ability to do statistics like you did > > > via the > > > early-inlining-insns parameter by

Re: [PR77719] Fix ICE in pp_string, at pretty-print.c:955

2016-09-25 Thread kugan
On 25/09/16 04:50, kugan wrote: Hi, In make_new_ssa_for_def (tree-reassoc.c) we should use gimple_get_lhs to get lhs instead of gimple_assign_lhs as stmt can be builtins too. Attached patch fixes this. Testcase from PR (attached) seems to fail. I dont any fortran so I didnt try fixing it. Any

Re: [PATCH 4/4][Ada,DJGPP] Ada support for DJGPP

2016-09-25 Thread Andris Pavenis
On 09/25/2016 09:10 PM, Arnaud Charlet wrote: Is the above change really necessary? Would be nice to get rid of this extra code. The rest looks OK to me. It is required for support of environment when LFN support is either not available or disabled for some reason (for example FreeDOS without LF

Re: [patch] Fix ICE on ACATS test for Aarch64 at -O

2016-09-25 Thread Eric Botcazou
> So while emit_store_flag_force knows what to do upon NULL return, I'm > not sure the other users of expand_shift/expand_shift_1 do. Revised patch attached, tested on x86-64/Linux, OK for the mainline? 2016-09-26 Eric Botcazou * expmed.c (expand_shift_1): Add MAY_FAIL parameter an