Re: [PATCH][GCC] Fix native Windows x86 bootstrap failure with self test

2016-11-04 Thread JonY
On 11/4/2016 21:22, Tamar Christina wrote: > Hi all, > > The GCC self-test added in r237144 breaks the > native Windows x86 builds (e.g. mingw-w64). > This fixes (PR78196) by explicitly adding /dev/null as > the output file to the GCC self test. > > The test essentially does `-xc -S -c /dev/null

[PATCH] fix a few minor nits in -Walloca documentation

2016-11-04 Thread Martin Sebor
While experimenting with -Walloca and cross-referencing the manual I noticed a few minor nits that I thought could stand to corrected and/or clarified. Attached is a patch. In the update I mentioned that the alloca argument must have integer type for the bounds checking to be recognized to make

libgo patch committed: avoid confusion matching type names in mksysinfo

2016-11-04 Thread Ian Lance Taylor
This patch to the script libgo/mksysinfo.sh tries to avoid confusion in upcase_fields when matching type names. It could accidentally match multiple types starting with the same name. I believe this is the underlying cause of GCC PR 78172. Also redirect a grep to /dev/null to avoid extraneous me

Re: [PATCH] libiberty: Fix -Wimplicit-fallthrough warnings.

2016-11-04 Thread Mark Wielaard
On Wed, 2016-11-02 at 14:24 +0100, Jakub Jelinek wrote: > On Wed, Nov 02, 2016 at 02:19:33PM +0100, Mark Wielaard wrote: > > libiberty/ChangeLog: > > > >* cplus-dem.c (demangle_signature): Move fall through comment. > >(demangle_fund_type): Add fall through comment between 'G' and

PR 78188 & 71848

2016-11-04 Thread David Edelsohn
Something in cgraph appears to be relying on COMDAT support if DECL_ONE_ONLY is available. This is the cause of the AIX bootstrap failure due to recent tree-vrp.c change, earlier tree-ssa-sccvn.c change. Also a recent C++ front-end change caused new libstdc++ testsuite failures that seems to have

Re: [PATCH, GCC, wwwdocs] Document new Cortex-M23 and Cortex-M33 processors support in ARM backend

2016-11-04 Thread Gerald Pfeifer
On Fri, 4 Nov 2016, Thomas Preudhomme wrote: This patch document the newly added support in GCC 7 for Cortex-M23 and Cortex-M33 processors [1][2]. : Is this ok for ? Surely so for me. Gerald

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-04 Thread Mike Stump
On Nov 4, 2016, at 2:35 AM, Georg-Johann Lay wrote: > >> .word .L3-(.L2) >> >> which seems wrong, given all the other code-gen. I think this has to be >> gs(.L3)-(gs(.L2)), no? I tried to get binutils to do that for me directly >> with a .word and it seemed resistant; which is unfortunate.

Simplify X / X, 0 / X and X % X

2016-11-04 Thread Marc Glisse
Hello, since we were discussing this recently... The condition is copied from the existing 0 % X case, visible in the context of the diff. As far as I understand, the main case where we do not want to optimize is during constexpr evaluation in the C++ front-end (it wants to detect the undef

Re: [PATCH] enhance buffer overflow warnings (and c/53562)

2016-11-04 Thread Martin Sebor
Attached is an update to the patch that takes into consideration the feedback I got. It goes back to adding just one option, -Wstringop-overflow, as in the original, while keeping the Object Size type as an argument. It uses type-1 as the default setting for string functions (strcpy et al.) and,

Re: [PATCH] rtx_writer: avoid printing trailing default values

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 08:25 PM, David Malcolm wrote: return m_compact; Ok with this one plus a comment. Bernd

Re: [PATCH] rtx_writer: avoid printing trailing default values

2016-11-04 Thread David Malcolm
On Fri, 2016-11-04 at 19:53 +0100, Bernd Schmidt wrote: > On 11/04/2016 08:14 PM, David Malcolm wrote: > > > > With this, compact dumps omit the trailing (nil) for both regular > > insns > > and for JUMP_INSNs, and omits the surplus newline seen in my > > earlier patch. > > > > It also appears re

Re: [Patch, fortran] PR64933 - ASSOCIATE on a character variable does not allow substring expressions

2016-11-04 Thread Paul Richard Thomas
Committed as revision 241860. Thanks for the review. Paul On 4 November 2016 at 19:21, Steve Kargl wrote: > On Fri, Nov 04, 2016 at 12:43:37PM +0100, Paul Richard Thomas wrote: >> >> The associate construct does not readily permit the identification of >> the associate name as an array during p

Re: [Patch, fortran] PR64933 - ASSOCIATE on a character variable does not allow substring expressions

2016-11-04 Thread Paul Richard Thomas
Hi Steve, Thanks. At least it cannot do any harm :-) I will get on with it. Paul On 4 November 2016 at 19:21, Steve Kargl wrote: > On Fri, Nov 04, 2016 at 12:43:37PM +0100, Paul Richard Thomas wrote: >> >> The associate construct does not readily permit the identification of >> the associate

Re: [PATCH] Add target hook to compute register pressure classes

2016-11-04 Thread Vladimir N Makarov
On 11/04/2016 12:18 PM, Pat Haugen wrote: While working to get -fsched-pressure profitable on PowerPC, one of the things I noticed causing problems was the selection of pressure classes. Understanding that getting the computation of pressure classes correct for all targets in the machine ind

Re: [PATCH] Fix nonoverlapping_memrefs_p ICE (PR target/77834, take 2)

2016-11-04 Thread Richard Biener
On November 4, 2016 5:27:11 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >On Wed, Nov 02, 2016 at 10:46:40AM +0100, Richard Biener wrote: >> Yeah, plus if a followup test would have disambiguated things (the >> dispatch to the tree oracle for example). > >After discussing this on IRC that the dse.c

Re: [PATCH] rtx_writer: avoid printing trailing default values

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 08:14 PM, David Malcolm wrote: With this, compact dumps omit the trailing (nil) for both regular insns and for JUMP_INSNs, and omits the surplus newline seen in my earlier patch. It also appears removes the trailing (nil) from expr_list. Bootstrap®rtest in progress. OK for trunk

[PATCH] rtx_writer: avoid printing trailing default values

2016-11-04 Thread David Malcolm
On Fri, 2016-11-04 at 18:51 +0100, Bernd Schmidt wrote: > Here's something simpler. Only very lightly tested, but isn't > something > like this all that's needed? Could decide whether to apply it to > expr_list etc. as well. > > Index: print-rtl.c >

Re: [PATCH] Print repeated rtl vector elements in a nicer way

2016-11-04 Thread Martin Jambor
On Thu, Nov 03, 2016 at 05:43:50PM +0100, Bernd Schmidt wrote: > On 11/03/2016 05:35 PM, Martin Jambor wrote: > > > > * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times > > an element is repeated istead of printing each repeated element. > > "instead" Will fix. > > >

Re: [Patch, fortran] PR64933 - ASSOCIATE on a character variable does not allow substring expressions

2016-11-04 Thread Steve Kargl
On Fri, Nov 04, 2016 at 12:43:37PM +0100, Paul Richard Thomas wrote: > > The associate construct does not readily permit the identification of > the associate name as an array during parsing. However, this can be > done whilst matching rvalues within the associate block. This patch > extends this

Re: [PATCH] rtx_writer: avoid printing trailing nils

2016-11-04 Thread Bernd Schmidt
Here's something simpler. Only very lightly tested, but isn't something like this all that's needed? Could decide whether to apply it to expr_list etc. as well. Index: print-rtl.c === --- print-rtl.c (revision 241233) +++ print-rtl

Re: [PATCH, rs6000] Fold vector addition built-ins in GIMPLE

2016-11-04 Thread Segher Boessenkool
Hi Bill, On Tue, Nov 01, 2016 at 09:05:03PM -0500, Bill Schmidt wrote: > As Jakub suggested in response to my *ahem* ornate patch for overloaded > function built-ins, a much better approach is to use the existing > machinery for overloading and then immediately fold the specific > functions during

Privatize copy_blkmode_from_reg

2016-11-04 Thread Eric Botcazou
Tested on x86-64/Linux, applied on the mainline as obvious. 2016-11-04 Eric Botcazou * expr.h (copy_blkmode_from_reg): Delete. * expr.c (copy_blkmode_from_reg): Make static. -- Eric BotcazouIndex: expr.c === ---

Re: [PATCH] rtx_writer: avoid printing trailing nils

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 06:32 PM, David Malcolm wrote: ASSERT_RTL_DUMP_EQ ("(cjump_insn 1 (set (pc)\n" "(label_ref 0))\n" - " (nil))\n", + " )\n", jump_insn); This looks like the patch doesn't go the wh

RE: [PATCH,testsuite] MIPS: Downgrade R6 to R5 if tests need branch-likely instructions.

2016-11-04 Thread Matthew Fortune
Toma Tabacu writes: > I've noticed that there is a typo in my surname in the ChangeLog entry > (in the name and in the email address). Apologies, corrected. Matthew

RE: [PATCH,testsuite] MIPS: Downgrade R6 to R5 if tests need branch-likely instructions.

2016-11-04 Thread Toma Tabacu
> From: Matthew Fortune > Sent: 04 November 2016 16:49 > To: Toma Tabacu; gcc-patches@gcc.gnu.org > Cc: catherine_mo...@mentor.com > Subject: RE: [PATCH,testsuite] MIPS: Downgrade R6 to R5 if tests need branch- > likely instructions. > > Toma Tabacu writes: > > > From: gcc-patches-ow...@gcc.gnu.o

Re: ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-04 Thread Jason Merrill
On Fri, Nov 4, 2016 at 12:16 PM, Jakub Jelinek wrote: > On Fri, Nov 04, 2016 at 05:05:51PM +0100, Marek Polacek wrote: >> This is a similar case to PR sanitizer/70342. Here, we were generating >> expression >> in a quadratic fashion because of the initializer--we create SAVE_EXPR <>, >> then >>

[PATCH] rtx_writer: avoid printing trailing nils

2016-11-04 Thread David Malcolm
On Fri, 2016-10-21 at 12:04 +0200, Bernd Schmidt wrote: > On 10/21/2016 02:36 AM, David Malcolm wrote: > > + ASSERT_RTL_DUMP_EQ ("(cjump_insn (set (pc)\n" > > + "(label_ref 0))\n" > > + " (nil))\n", > > +

Re: [PATCH, gcc/ARM, ping] Add support for Cortex-M23

2016-11-04 Thread Thomas Preudhomme
On 02/11/16 10:13, Kyrill Tkachov wrote: On 02/11/16 10:07, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 26/10/16 17:42, Thomas Preudhomme wrote: Hi, This patch adds support for the Cortex-M23 processor launched by ARM [1]. The patch adds support for the name and wires it up to t

Re: [PATCH, gcc/ARM, ping] Add support for Cortex-M33

2016-11-04 Thread Thomas Preudhomme
On 02/11/16 10:14, Kyrill Tkachov wrote: On 02/11/16 10:07, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 26/10/16 17:42, Thomas Preudhomme wrote: Hi, This patch adds support for the Cortex-M33 processor launched by ARM [1]. The patch adds support for the name and wires it up to

[PATCH, GCC, wwwdocs] Document new Cortex-M23 and Cortex-M33 processors support in ARM backend

2016-11-04 Thread Thomas Preudhomme
Hi there, This patch document the newly added support in GCC 7 for Cortex-M23 and Cortex-M33 processors [1][2]. [1] http://www.arm.com/products/processors/cortex-m/cortex-m23-processor.php [2] http://www.arm.com/products/processors/cortex-m/cortex-m33-processor.php Is this ok for ? Best rega

[PATCH] Remove a FIXME from verify_type_variant

2016-11-04 Thread Martin Jambor
Hi, now that we removed java, let us check whether the FIXME this removes (and that was added by Honza) is actually true. It only affects checking runs and if it turns out to be false, we can easily revert this. Bootstrapped, LTO-bootstrapped and tested on x86_64-linux and aarch64-linux, OK for

RE: [PATCH,testsuite] MIPS: Downgrade R6 to R5 if tests need branch-likely instructions.

2016-11-04 Thread Matthew Fortune
Toma Tabacu writes: > > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > > ow...@gcc.gnu.org] On Behalf Of Toma Tabacu > > Sent: 04 November 2016 15:25 > > To: Matthew Fortune; gcc-patches@gcc.gnu.org > > Cc: catherine_mo...@mentor.com > > Subject: RE: [PATCH,testsuite] MIPS: Downgrade R

Re: [patch, libgfortran] Bug 78123 - Short reads with T edit descriptor not padding correctly

2016-11-04 Thread Christophe Lyon
On 4 November 2016 at 17:28, Jerry DeLisle wrote: > On 11/04/2016 07:11 AM, Christophe Lyon wrote: >> >> On 4 November 2016 at 14:48, Christophe Lyon >> wrote: >>> >>> On 30 October 2016 at 21:40, Thomas Koenig wrote: Hi Jerry, > --- snip --- >>> >>> >>> The new test fails at exec

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Jakub Jelinek
On Fri, Nov 04, 2016 at 05:18:13PM +0100, Bernd Schmidt wrote: > On 11/04/2016 01:26 PM, Jakub Jelinek wrote: > > > >In any case, the second hunk fixes an important DSE bug that just got > >revealed by the former change. > > Can you elaborate on that (what situation does it occur in, is it covered

[PATCH] Fix nonoverlapping_memrefs_p ICE (PR target/77834, take 2)

2016-11-04 Thread Jakub Jelinek
Hi! On Wed, Nov 02, 2016 at 10:46:40AM +0100, Richard Biener wrote: > Yeah, plus if a followup test would have disambiguated things (the > dispatch to the tree oracle for example). After discussing this on IRC that the dse.c and sched-deps.c (call (mem ...) ) changes are probably not safe, I'm pr

Re: [patch, libgfortran] Bug 78123 - Short reads with T edit descriptor not padding correctly

2016-11-04 Thread Jerry DeLisle
On 11/04/2016 07:11 AM, Christophe Lyon wrote: On 4 November 2016 at 14:48, Christophe Lyon wrote: On 30 October 2016 at 21:40, Thomas Koenig wrote: Hi Jerry, --- snip --- The new test fails at execution on arm and aarch64: gfortran.dg/fmt_t_9.f -O0 execution test gfortran.dg/fmt_

Re: [PATCH 2/2, expand] make expand_builtin_strncmp more general

2016-11-04 Thread Aaron Sawdey
ChangeLog for this patch: 2016-11-03  Aaron Sawdey   * builtins.c (expand_builtin_strncmp): Attempt expansion of strncmp via cmpstrnsi even if neither string is constant. -- Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux

Re: [PATCH 1/2, i386] cmpstrnsi needs string length

2016-11-04 Thread Aaron Sawdey
ChangeLog for this patch: 2016-11-03  Aaron Sawdey   * config/i386/i386.md (cmpstrnsi): New test to bail out if neither string input is a string constant. --  Aaron Sawdey, Ph.D. acsaw...@linux.vnet.ibm.com 050-2/C113 (507) 253-7520 home: 507/263-0782 IBM Linux Technology Cente

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 01:26 PM, Jakub Jelinek wrote: In any case, the second hunk fixes an important DSE bug that just got revealed by the former change. Can you elaborate on that (what situation does it occur in, is it covered by the testsuite)? Bernd

[PATCH] Add target hook to compute register pressure classes

2016-11-04 Thread Pat Haugen
While working to get -fsched-pressure profitable on PowerPC, one of the things I noticed causing problems was the selection of pressure classes. Understanding that getting the computation of pressure classes correct for all targets in the machine independent code is going to be extremely hard (o

RE: [PATCH,testsuite] MIPS: Downgrade R6 to R5 if tests need branch-likely instructions.

2016-11-04 Thread Toma Tabacu
> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Toma Tabacu > Sent: 04 November 2016 15:25 > To: Matthew Fortune; gcc-patches@gcc.gnu.org > Cc: catherine_mo...@mentor.com > Subject: RE: [PATCH,testsuite] MIPS: Downgrade R6 to R5 if tests need branch- > l

Re: ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-04 Thread Jakub Jelinek
On Fri, Nov 04, 2016 at 05:05:51PM +0100, Marek Polacek wrote: > This is a similar case to PR sanitizer/70342. Here, we were generating > expression > in a quadratic fashion because of the initializer--we create SAVE_EXPR <>, > then > UBSAN_NULL >, and then COMPOUND_EXPR of these two and so on.

ubsan PATCH to fix compile-time hog with operator overloading (PR sanitizer/78208)

2016-11-04 Thread Marek Polacek
This is a similar case to PR sanitizer/70342. Here, we were generating expression in a quadratic fashion because of the initializer--we create SAVE_EXPR <>, then UBSAN_NULL >, and then COMPOUND_EXPR of these two and so on. On this testcase we were instrumention CALL_EXPR that is in fact operato

[PATCH v2] Add mcpu flag for Qualcomm falkor core

2016-11-04 Thread Siddhesh Poyarekar
This adds an mcpu option for the upcoming Qualcomm Falkor core. This is identical to the qdf24xx part that was added earlier and hence retains the same tuning structure and continues to have the a57 pipeline for now. The part number has also been changed and this patch fixes this for both qdf24xx

[PATCH, committed] Fix PR78210

2016-11-04 Thread Bill Schmidt
Hi, On some targets (AArch64 in particular) test gcc.dg/tree-ssa/slsr-8.c fails because the scan of the SLSR dump is too strict. On these targets, a multiply may be a widening multiply, and that wasn't accounted for. Now it is. Committed as obvious. Thanks, Bill 2016-11-04 Bill Schmidt

RE: [PATCH,testsuite] MIPS: Downgrade R6 to R5 if tests need branch-likely instructions.

2016-11-04 Thread Toma Tabacu
> From: Matthew Fortune > Sent: 03 November 2016 13:07 > To: Toma Tabacu; gcc-patches@gcc.gnu.org > Cc: catherine_mo...@mentor.com > Subject: RE: [PATCH,testsuite] MIPS: Downgrade R6 to R5 if tests need > branch-likely instructions. > > Toma Tabacu writes: > > The gcc.target/mips/wrap-delay.c tes

Re: [PATCH, rs6000] Fold vector addition built-ins in GIMPLE

2016-11-04 Thread Bill Schmidt
Just a note that the "-std=gnu11" option in the test cases in this patch is a leftover from a previous version of the patch, which I'll plan to remove. Sorry for the oversight! Bill > On Nov 1, 2016, at 9:05 PM, Bill Schmidt wrote: > > Hi, > > As Jakub suggested in response to my *ahem* orna

Re: [PATCH] Start adding target-specific selftests

2016-11-04 Thread Bernd Schmidt
On 10/21/2016 07:45 PM, David Malcolm wrote: gcc/ChangeLog: * config/i386/i386.c: Include "selftest.h" and "selftest-rtl.h". (selftest::ix86_test_dumping_hard_regs): New function. (selftest::ix86_run_selftests): New function. (TARGET_RUN_TARGET_SELFTESTS): When CH

Re: [PATCH 2/4] BRIG (HSAIL) frontend: The FE itself.

2016-11-04 Thread Martin Jambor
Hi Pekka, On Sat, Oct 29, 2016 at 02:58:29PM +0300, Pekka Jääskeläinen wrote: > Hi Martin, > > Thanks for the comments and suggestions. Replies inline: > > On Thu, Oct 20, 2016 at 6:10 PM, Martin Jambor wrote: > > - Still quite few things need to be documented better, e.g.: > > + brig_to_gene

[Ping] Re: [PATCH] Start adding target-specific selftests

2016-11-04 Thread David Malcolm
(ping) https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01785.html On Fri, 2016-10-21 at 13:45 -0400, David Malcolm wrote: > On Fri, 2016-10-21 at 12:04 +0200, Bernd Schmidt wrote: > > On 10/21/2016 02:36 AM, David Malcolm wrote: > > > + /* Test dumping of hard regs. This is inherently target > >

Re: [PATCH, RFC] Fix PR71915, PR71490: Handle casts on strides consistently

2016-11-04 Thread Christophe Lyon
On 4 November 2016 at 15:36, Bill Schmidt wrote: > On Nov 4, 2016, at 9:10 AM, Christophe Lyon > wrote: >> >> >> Hi, >> >> Since this was committed, I'm seeing a failure in >> gcc.dg/tree-ssa/slsr-8.c scan-tree-dump-times optimized " \\* " 9 >> on aarch64 targets. > > Hi Christophe, > > Best op

Re: [libgcc] Protect __TMC_END__ - __TMC_LIST__ == 0

2016-11-04 Thread Andrew Pinski
On Fri, Nov 4, 2016 at 7:08 AM, Marc Glisse wrote: > Ping https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02220.html I think this is obvious. Thanks, Andrew > > > On Thu, 27 Oct 2016, Marc Glisse wrote: > >> Hello, >> >> some optimization patch I was working on simplified __TMC_END__ - >> __TMC_L

Re: [PATCH, RFC] Fix PR71915, PR71490: Handle casts on strides consistently

2016-11-04 Thread Bill Schmidt
On Nov 4, 2016, at 9:10 AM, Christophe Lyon wrote: > > > Hi, > > Since this was committed, I'm seeing a failure in > gcc.dg/tree-ssa/slsr-8.c scan-tree-dump-times optimized " \\* " 9 > on aarch64 targets. Hi Christophe, Best open a bug report or I will likely lose this in the crush. If you

Re: [PATCH] Five patches for std::experimental::filesystem

2016-11-04 Thread Christophe Lyon
On 2 November 2016 at 10:09, Christophe Lyon wrote: > On 27 October 2016 at 15:34, Jonathan Wakely wrote: >> On 26/10/16 09:24 +0200, Christophe Lyon wrote: >>> >>> Hi Jonathan, >>> >>> On 25 October 2016 at 17:32, Jonathan Wakely wrote: Two more fixes for the filesystem TS, and improv

Re: [PATCH, RFC] Fix PR71915, PR71490: Handle casts on strides consistently

2016-11-04 Thread Christophe Lyon
On 24 October 2016 at 12:55, Richard Biener wrote: > On Fri, Oct 21, 2016 at 11:46 PM, Bill Schmidt > wrote: >> Hi, >> >> I've been meaning for some time now to do a better job handling strength >> reduction candidates where the stride of the candidate and its basis >> involves a cast (usually wi

Re: [patch, libgfortran] Bug 78123 - Short reads with T edit descriptor not padding correctly

2016-11-04 Thread Christophe Lyon
On 4 November 2016 at 14:48, Christophe Lyon wrote: > On 30 October 2016 at 21:40, Thomas Koenig wrote: >> Hi Jerry, >> >>> See patch below which is very simple. We were handling the case where we >>> tabbed left of current position in the record by clearing the seen_eor >>> flag. We were not han

Re: [libgcc] Protect __TMC_END__ - __TMC_LIST__ == 0

2016-11-04 Thread Marc Glisse
Ping https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02220.html On Thu, 27 Oct 2016, Marc Glisse wrote: Hello, some optimization patch I was working on simplified __TMC_END__ - __TMC_LIST__ == 0 to false, which is not wanted (I assume that's why it wasn't written __TMC_END__ == __TMC_LIST__ in

Re: [PATCH][1/2] GIMPLE Frontend, C FE parts (and GIMPLE parser)

2016-11-04 Thread Jakub Jelinek
Hi! Just 2 nits: On Fri, Oct 28, 2016 at 01:46:57PM +0200, Richard Biener wrote: > +/* Return a pointer to the Nth token in PARERs tokens_buf. */ PARSERs ? > @@ -454,7 +423,7 @@ c_lex_one_token (c_parser *parser, c_token *token) > /* Return a pointer to the next token from PARSER, reading it

[PING][PATCH][1/2] GIMPLE Frontend, C FE parts (and GIMPLE parser)

2016-11-04 Thread Richard Biener
On Fri, 28 Oct 2016, Richard Biener wrote: > > These are the C (and ObjC) Frontend changes required by the GIMPLE > Frontend which is now itself contained in c/gimple-parser.[ch]. > > Most changes are due to a new c-parser.h header where we export > stuff from the C parser that the GIMPLE fronte

Re: [patch, libgfortran] Bug 78123 - Short reads with T edit descriptor not padding correctly

2016-11-04 Thread Christophe Lyon
On 30 October 2016 at 21:40, Thomas Koenig wrote: > Hi Jerry, > >> See patch below which is very simple. We were handling the case where we >> tabbed left of current position in the record by clearing the seen_eor >> flag. We were not handling the case where we tab toward the right and so >> are s

Re: [PATCH] Convert character arrays to string csts

2016-11-04 Thread Martin Liška
On 11/03/2016 02:00 PM, Jan Hubicka wrote: >> On 11/03/2016 01:12 PM, Martin Liška wrote: >>> + tree init = DECL_INITIAL (decl); >>> + if (init >>> + && TREE_READONLY (decl) >>> + && can_convert_ctor_to_string_cst (init)) >>> +DECL_INITIAL (decl) = build_string_cst_from_ctor (init);

Re: [PATCH] combine lhs zero_extract fix (PR78186)

2016-11-04 Thread Christophe Lyon
On 3 November 2016 at 17:01, Segher Boessenkool wrote: > I managed to forget to mask the thing inserted. Tested on powerpc64-linux > {-m32,-m64}, and Bin tested on arm. Applying to trunk. > > > Segher > > > 2016-11-03 Segher Boessenkool > > PR rtl-optimization/78186 > * combin

Re: Simplify X /[ex] 8 == 0

2016-11-04 Thread Marc Glisse
On Fri, 4 Nov 2016, Richard Biener wrote: On Fri, Nov 4, 2016 at 2:15 PM, Richard Biener wrote: On Fri, Nov 4, 2016 at 1:34 PM, Marc Glisse wrote: Hello, this kind of simplification is already handled by fold_comparison, but the code is common with TRUNC_DIV_EXPR, which yields suboptimal co

Re: [PATCH] Convert character arrays to string csts

2016-11-04 Thread Martin Liška
On 11/03/2016 01:46 PM, Richard Biener wrote: > On Thu, Nov 3, 2016 at 1:12 PM, Martin Liška wrote: >> Hello. >> >> This is small follow-up of the patches I sent to string folding. >> The patch transforms character array defined in an initializer to string >> constant: >> >> +const char global[] =

[PATCH] Improve vect cost model for PR37150

2016-11-04 Thread Richard Biener
The following implements some easy improvements for the SLP cost model for PR37150 which shows excess cost for dead loads and permutes accounted when vectorizing a basic-block. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Still doesn't vectorize the testcase in that PR without

[PATCH][GCC] Fix native Windows x86 bootstrap failure with self test

2016-11-04 Thread Tamar Christina
Hi all, The GCC self-test added in r237144 breaks the native Windows x86 builds (e.g. mingw-w64). This fixes (PR78196) by explicitly adding /dev/null as the output file to the GCC self test. The test essentially does `-xc -S -c /dev/null -fself-test` `/dev/null` is then converted into the Window

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Richard Biener
On Fri, 4 Nov 2016, Jakub Jelinek wrote: > On Fri, Nov 04, 2016 at 01:59:05PM +0100, Richard Biener wrote: > > > So like the variant patch I've just posted? > > > > That doesn't handle > > > > int __attribute__((const,noinline)) > > foo () > > { > > return 1; > > } > > > > int bar() > > { > >

Re: Simplify X /[ex] 8 == 0

2016-11-04 Thread Richard Biener
On Fri, Nov 4, 2016 at 2:15 PM, Richard Biener wrote: > On Fri, Nov 4, 2016 at 1:34 PM, Marc Glisse wrote: >> Hello, >> >> this kind of simplification is already handled by fold_comparison, but the >> code is common with TRUNC_DIV_EXPR, which yields suboptimal code. In >> particular, for an unsig

Re: Simplify X /[ex] 8 == 0

2016-11-04 Thread Richard Biener
On Fri, Nov 4, 2016 at 1:34 PM, Marc Glisse wrote: > Hello, > > this kind of simplification is already handled by fold_comparison, but the > code is common with TRUNC_DIV_EXPR, which yields suboptimal code. In > particular, for an unsigned number, X/8==0 means x<=7, while X/[ex]8==0 can > be turne

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Jakub Jelinek
On Fri, Nov 04, 2016 at 01:59:05PM +0100, Richard Biener wrote: > > So like the variant patch I've just posted? > > That doesn't handle > > int __attribute__((const,noinline)) > foo () > { > return 1; > } > > int bar() > { > *((int *)foo) + 4 = 2; > int ret = foo (); > *((int *)foo) + 4

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Richard Biener
On Fri, 4 Nov 2016, Jakub Jelinek wrote: > On Fri, Nov 04, 2016 at 01:47:36PM +0100, Richard Biener wrote: > > I'm not sure the current code handled this correctly? At least I > > see nothing on the GIMPLE level that would disallow the DSE: > > > > int foo () > > { > > char a[256]; > > a[0]

Re: [RFC] Check number of uses in simplify_cond_using_ranges().

2016-11-04 Thread Richard Biener
On Fri, Nov 4, 2016 at 12:08 PM, Dominik Vogt wrote: > On Fri, Nov 04, 2016 at 09:47:26AM +0100, Richard Biener wrote: >> On Thu, Nov 3, 2016 at 4:03 PM, Dominik Vogt wrote: >> > Is VRP the right pass to do this optimisation or should a later >> > pass rather attempt to eliminate the new use of b

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Jakub Jelinek
On Fri, Nov 04, 2016 at 01:47:36PM +0100, Richard Biener wrote: > I'm not sure the current code handled this correctly? At least I > see nothing on the GIMPLE level that would disallow the DSE: > > int foo () > { > char a[256]; > a[0] = 'a'; > a[1] = 'b'; > int __attribute__((const)) (*fn

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Jakub Jelinek
On Fri, Nov 04, 2016 at 01:33:54PM +0100, Bernd Schmidt wrote: > On 11/04/2016 01:26 PM, Jakub Jelinek wrote: > > > >The following patch avoids that. Of course the question is if we want > >to support something like: > >char var[64]; > >... > >var[0] = '0xe8'; > >var[1] = ...; > >(void (*fn) (void

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Richard Biener
On Fri, 4 Nov 2016, Jakub Jelinek wrote: > Hi! > > One of the common reasons why nonoverlapping_memrefs_p is called with > MEM_EXPRs that are FUNCTION_DECLs and don't have DECL_RTL set is that > DSE considers all calls to be memory reads from what is being called. > > The following patch avoids

C++ PATCH for c++/78198 (inherited template ctor with default arg)

2016-11-04 Thread Jason Merrill
Default arguments of an inherited ctor remain in the context of the inherited function, not the artificial inheriting constructor. Tested x86_64-pc-linux-gnu, applying to trunk. commit d6ceff13167956b660317ef37a40ba7110d325c4 Author: Jason Merrill Date: Thu Nov 3 16:14:51 2016 -0400

Re: [PATCH GCC]Clean pedantic calls and useless lvalue code in fold_cond_expr_with_comparison

2016-11-04 Thread Jason Merrill
On Fri, Nov 4, 2016 at 4:40 AM, Richard Biener wrote: > On Thu, Nov 3, 2016 at 3:11 PM, Bin Cheng wrote: >> Hi, >> According to analysis given by >> https://gcc.gnu.org/ml/gcc/2016-10/msg00228.html, calls to >> pedantic_non_lvalue_loc and code handling lvalue in >> fold_cond_expr_with_comparis

Re: [PATCH] Fix wrong declarations of builtin functions

2016-11-04 Thread Bernd Schmidt
On 11/03/2016 10:52 PM, Bernd Edlinger wrote: I thought in preparation of the new C++ warning about wrong declarations of builtin functions it would be good to fix some of the more obvious bugs in the testsuite first. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Ok. Bernd

Simplify X /[ex] 8 == 0

2016-11-04 Thread Marc Glisse
Hello, this kind of simplification is already handled by fold_comparison, but the code is common with TRUNC_DIV_EXPR, which yields suboptimal code. In particular, for an unsigned number, X/8==0 means x<=7, while X/[ex]8==0 can be turned into X==0. When we have an explicit division by 0, ther

Re: [PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Bernd Schmidt
On 11/04/2016 01:26 PM, Jakub Jelinek wrote: The following patch avoids that. Of course the question is if we want to support something like: char var[64]; ... var[0] = '0xe8'; var[1] = ...; (void (*fn) (void) = (void (*) (void)) &var[0]; fn (); without any kind of barrier, or not. I was goin

[PATCH] Fix sched-deps not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Jakub Jelinek
Hi! Similarly to the previous patch, this one is the second spot where nonoverlapping_memrefs_p is called with FUNCTION_DECLs without DECL_RTL. With both patches in the only case this happens in bootstrap/regtest is the pr77834.c testcase. Same questions as for the DSE patch apply. 2016-11-04

[PATCH] Fix DSE not to consider calls as reads from function's body (PR target/77834)

2016-11-04 Thread Jakub Jelinek
Hi! One of the common reasons why nonoverlapping_memrefs_p is called with MEM_EXPRs that are FUNCTION_DECLs and don't have DECL_RTL set is that DSE considers all calls to be memory reads from what is being called. The following patch avoids that. Of course the question is if we want to support s

RE: [PATCH] [ARC] Various small miscellaneous fixes.

2016-11-04 Thread Claudiu Zissulescu
> All the rest looks good. > Committed with the suggested changes. Thank you for your review, Claudiu

Re: [PATCH] Convert SPARC to LRA

2016-11-04 Thread Eric Botcazou
> Are there any plans to switch the SPARC GCC to LRA for GCC 7 or later? There are plans to switch SPARC to LRA at some point, but no ETA. -- Eric Botcazou

Re: [PATCH] Make direct emission of time profiler counter

2016-11-04 Thread Martin Liška
On 11/04/2016 11:14 AM, Martin Liška wrote: > Hello. > > Sorry for the breakage, I'm attaching untested patch which fixes that. > I'm going to trigger regression tests. > > Martin Regression tests have finished on ppc64le-redhat-linux. Ready to be installed? Martin

[Patch, fortran] PR64933 - ASSOCIATE on a character variable does not allow substring expressions

2016-11-04 Thread Paul Richard Thomas
Dear All, The associate construct does not readily permit the identification of the associate name as an array during parsing. However, this can be done whilst matching rvalues within the associate block. This patch extends this identification in gfc_match_varspec, whilst excluding character types

RE: [PATCH] [ARC] New option handling, refurbish multilib support.

2016-11-04 Thread Claudiu Zissulescu
Andrew, > you create the TargetVariable arc_mpy_option, however, I think it > would be neater to fold this variable into the mmpy-option as it was > before, but, changing the type to Enum. This would allow the big > option checking switch to be removed from arc-common.c, which I think > is a win

Re: [RFC] Check number of uses in simplify_cond_using_ranges().

2016-11-04 Thread Dominik Vogt
On Fri, Nov 04, 2016 at 09:47:26AM +0100, Richard Biener wrote: > On Thu, Nov 3, 2016 at 4:03 PM, Dominik Vogt wrote: > > Is VRP the right pass to do this optimisation or should a later > > pass rather attempt to eliminate the new use of b_5 instead? Uli > > has brought up the idea a mini "sign e

Re: [PATCH] Generate reproducible output independently of the build-path

2016-11-04 Thread Ximin Luo
Mike Stump: > On Nov 3, 2016, at 1:01 PM, Ximin Luo wrote: >> Log snippets attached. > > Ick. You missed the utility of contrib/compare_tests. :-) > > If you say: > > contrib/compare_tests oldbuilddir newbuilddir > > You can then sit back and see everything as you'd expect and want. The

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope (v2)

2016-11-04 Thread Martin Liška
On 11/04/2016 10:32 AM, Jakub Jelinek wrote: > Hi! > > On Fri, Nov 04, 2016 at 10:17:31AM +0100, Martin Liška wrote: >> diff --git a/gcc/gimplify.c b/gcc/gimplify.c >> index 813777d..86ce793 100644 >> --- a/gcc/gimplify.c >> +++ b/gcc/gimplify.c >> @@ -1678,7 +1678,9 @@ warn_switch_unreachable_r (

Re: [PATCH] Convert SPARC to LRA

2016-11-04 Thread Sebastian Huber
On 08/12/15 17:55, David Miller wrote: From: Sebastian Huber Date: Tue, 8 Dec 2015 11:17:53 +0100 since the LRA patch is still reverted on the trunk, I guess the switch to LRA will not happen in GCC 6? Indeed, it is unlikely I will have time to work on this for at least a month. Are there a

Re: [PATCH] Make direct emission of time profiler counter

2016-11-04 Thread Martin Liška
On 11/04/2016 10:18 AM, Christophe Lyon wrote: > On 3 November 2016 at 16:11, Jan Hubicka wrote: >>> >>> 2016-10-31 Martin Liska >>> >>> * libgcov-profiler.c (__gcov_time_profiler): Remove. >>> (__gcov_time_profiler_atomic): Likewise. >>> >>> gcc/ChangeLog: >>> >>> 2016-10-31 Marti

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-04 Thread Georg-Johann Lay
On 04.11.2016 06:18, Senthil Kumar Selvaraj wrote: Georg-Johann Lay writes: State of matters is that Binutils support is missing, and if I understand you correctly, dg-require is not appropriate to factor out availability of such features? I'll take a stab at adding the missing binutils suppo

Re: [patch,testsuite] Support dg-require-effective-target label_offsets.

2016-11-04 Thread Georg-Johann Lay
On 04.11.2016 03:48, Mike Stump wrote: On Nov 3, 2016, at 8:25 AM, Georg-Johann Lay wrote: On 28.10.2016 17:58, Mike Stump wrote: On Oct 27, 2016, at 3:16 AM, Georg-Johann Lay wrote: Now imagine some arithmetic like &&LAB2 - &&LAB1. This might result in one or two stub addresses, and diff

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope (v2)

2016-11-04 Thread Jakub Jelinek
Hi! On Fri, Nov 04, 2016 at 10:17:31AM +0100, Martin Liška wrote: > diff --git a/gcc/gimplify.c b/gcc/gimplify.c > index 813777d..86ce793 100644 > --- a/gcc/gimplify.c > +++ b/gcc/gimplify.c > @@ -1678,7 +1678,9 @@ warn_switch_unreachable_r (gimple_stmt_iterator *gsi_p, > bool *handled_ops_p, >

Re: [PATCHv2 5/7, GCC, ARM, V8M] Handling ARMv8-M Security Extension's cmse_nonsecure_call attribute

2016-11-04 Thread Kyrill Tkachov
Hi Andre, On 25/10/16 17:29, Andre Vieira (lists) wrote: On 24/08/16 12:01, Andre Vieira (lists) wrote: On 25/07/16 14:25, Andre Vieira (lists) wrote: This patch adds support for the ARMv8-M Security Extensions 'cmse_nonsecure_call' attribute. This attribute may only be used for function types

Re: [PATCH] Make direct emission of time profiler counter

2016-11-04 Thread Christophe Lyon
On 3 November 2016 at 16:11, Jan Hubicka wrote: >> >> 2016-10-31 Martin Liska >> >> * libgcov-profiler.c (__gcov_time_profiler): Remove. >> (__gcov_time_profiler_atomic): Likewise. >> >> gcc/ChangeLog: >> >> 2016-10-31 Martin Liska >> >> * profile.c (instrument_values): Fix

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope (v2)

2016-11-04 Thread Martin Liška
On 11/02/2016 03:35 PM, Jakub Jelinek wrote: > On Wed, Nov 02, 2016 at 03:27:42PM +0100, Martin Liška wrote: >>> So is there anything I should do wrt -Wswitch-unreachable? >>> >>> Marek >>> >> >> Probably not. I'm having a patch puts GIMPLE_SWITCH statement to a proper >> place >> in GIMPLE_BI

Re: [match.pd] Fix for PR35691

2016-11-04 Thread Prathamesh Kulkarni
On 4 November 2016 at 13:41, Richard Biener wrote: > On Thu, 3 Nov 2016, Marc Glisse wrote: > >> On Thu, 3 Nov 2016, Richard Biener wrote: >> >> > > > > The transform would also work for vectors (element_precision for >> > > > > the test but also a value-matching zero which should ensure the >> >

Re: [patch] Clean up WORD_REGISTER_OPERATIONS & LOAD_EXTEND_OP tests

2016-11-04 Thread Richard Biener
On Thu, Nov 3, 2016 at 9:56 PM, Eric Botcazou wrote: > Hi, > > WORD_REGISTER_OPERATIONS and LOAD_EXTEND_OP are partially used directly as > preprocessor macros and partially tested in the code. This patch brings a bit > of consistency into this by converting the remaining macro cases. > > Tested

  1   2   >