Re: [PATCH] c++/78774 - [6/7 Regression] ICE in constexpr string literals and templates

2016-12-14 Thread Jakub Jelinek
On Wed, Dec 14, 2016 at 08:10:10PM -0700, Martin Sebor wrote: > Do you approve backporting this fix to the 6.x branch? Yes, but please wait a little bit with that (i.e. only commit it after 6.3 is released next week). I'm also surprised this code does not care about what TREE_CODE inner is, handl

Re: [PATCH] detect null sprintf pointers (PR 78519)

2016-12-14 Thread Jeff Law
On 12/14/2016 09:21 PM, Martin Sebor wrote: I suppose setting a range seemed better than giving up. Then again, since with this patch GCC will warn on null %s pointers there may not be much point in trying to see if there's also some other problem after that, except perhaps in code that delibera

Re: [PATCH] detect null sprintf pointers (PR 78519)

2016-12-14 Thread Martin Sebor
I suppose setting a range seemed better than giving up. Then again, since with this patch GCC will warn on null %s pointers there may not be much point in trying to see if there's also some other problem after that, except perhaps in code that deliberately relies on the Glibc feature. I'd be fin

Re: [PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-14 Thread Jeff Law
On 12/14/2016 03:56 PM, Martin Sebor wrote: The -Wnonnull warning improvement (PR c/17308 - nonnull attribute not as useful as it could be) causes a couple of false positives in a powerpc64le bootstrap. The attached fix suppresses them. It passes bootstrap on powerpc64le but tests are still runn

Re: [PATCH] c++/78774 - [6/7 Regression] ICE in constexpr string literals and templates

2016-12-14 Thread Martin Sebor
Jakub, Do you approve backporting this fix to the 6.x branch? Martin On 12/12/2016 08:53 PM, Jason Merrill wrote: On 12/12/2016 11:51 AM, Martin Sebor wrote: The attached patch removes the unsafe assumption behind the ICE. Is this okay for both trunk and GCC 6? + && TREE_CODE (inn

Go patch committed: remove unneeded zero-length slice value init

2016-12-14 Thread Ian Lance Taylor
This patch by Than McIntosh removes an unnecessary initializer when building the set of values to store in a slice of zero length. This removes some code that dates back to 2008 and may have something to do with different handling of nil slices back then (I no longer recall). Bootstrapped and ran

[committed] Introduce selftest::locate_file (v5)

2016-12-14 Thread David Malcolm
On Wed, 2016-12-14 at 15:02 +0100, Bernd Schmidt wrote: > On 12/09/2016 08:32 PM, David Malcolm wrote: > > Thanks. Unfortunately, applying the "locate_file" patch > > https://gcc.gnu.org/ml/gcc-patches/2016-11/msg01186.html > > would now introduce a regression in a recently-added test case: > >

New Spanish PO file for 'gcc' (version 6.2.0)

2016-12-14 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Spanish team of translators. The file is available at: http://translationproject.org/latest/gcc/es.po (This file, 'gcc-6.2.0.es.po', has just

Re: [PATCH] Fix PR78515

2016-12-14 Thread Martin Sebor
On 11/25/2016 06:55 AM, Richard Biener wrote: On Fri, 25 Nov 2016, Martin Jambor wrote: Hi, On Fri, Nov 25, 2016 at 12:01:38PM +0100, Richard Biener wrote: I am testing the following to beat some sanity into compute_complex_assign_jump_func. That the function does not handle ternary operat

Re: [libcc1] add support for C++

2016-12-14 Thread Alexandre Oliva
On Oct 19, 2016, Alexandre Oliva wrote: > On Sep 23, 2016, Alexandre Oliva wrote: >> This patchset adds support for the C++ language to libcc1. >> It updates a few patches for libcc1 by Jan Kratochvil, posted long ago >> but IIRC not reviewed; it updates a patch that adds support for >> represen

[PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

2016-12-14 Thread Martin Sebor
The -Wnonnull warning improvement (PR c/17308 - nonnull attribute not as useful as it could be) causes a couple of false positives in a powerpc64le bootstrap. The attached fix suppresses them. It passes bootstrap on powerpc64le but tests are still running. I couldn't reproduce the bootstrap comp

Re: [PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)

2016-12-14 Thread Eric Botcazou
> The gimplifier (because of Ada :( ) doesn't recurse to POINTER_TYPE's > type when gimplifying types, so we need a DECL_EXPR to gimplify such > types if they are VLAs. The following patch is an attempt to do that. Well, you should rather say thanks... The gimplification point is also the point

Re: [PATCH] add missing attribute nonnull to stdio functions (PR 78673 and 17308)

2016-12-14 Thread Jakub Jelinek
On Wed, Dec 07, 2016 at 08:24:33PM -0700, Martin Sebor wrote: > @@ -8622,15 +8635,17 @@ rewrite_call_expr (location_t loc, tree exp, int > skip, tree fndecl, int n, ...) > } > > /* Validate a single argument ARG against a tree code CODE representing > - a type. */ > + a type. When NONNUL

Re: [Patch][ARM,AArch64] more poly64 intrinsics and tests

2016-12-14 Thread Christophe Lyon
On 14 December 2016 at 17:55, James Greenhalgh wrote: > On Mon, Dec 12, 2016 at 05:03:31PM +0100, Christophe Lyon wrote: >> Hi, >> >> After the recent update from Tamar, I noticed a few discrepancies >> between ARM and AArch64 regarding a few poly64 intrinsics. >> >> This patch: >> - adds vtst_p64

[PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)

2016-12-14 Thread Jakub Jelinek
Hi! The gimplifier (because of Ada :( ) doesn't recurse to POINTER_TYPE's type when gimplifying types, so we need a DECL_EXPR to gimplify such types if they are VLAs. The following patch is an attempt to do that. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-12-14 J

[C++ PATCH] Reject out of bounds constexpr stores (PR c++/77830)

2016-12-14 Thread Jakub Jelinek
Hi! On the following testcase we ICE, because we don't diagnose invalid out of bounds stores and create garbage CONSTRUCTOR that the middle-end ICEs on. The following patch enables out of bounds diagnostics even for the case when lval is true, but because lval = true is used not just for the lhs o

Re: Pretty printers for versioned namespace

2016-12-14 Thread François Dumont
On 09/12/2016 16:18, Jonathan Wakely wrote: But I don't know how to fix this so for the moment I just adapt it to correctly handle std::__7::string. But that's not correct. Please try to understand the point I'm making: The name "std::__7::string" does not appear in a symbol name. Ok, the onl

[committed] Fix stack temp slot handling in the stv pass (PR target/78791)

2016-12-14 Thread Jakub Jelinek
Hi! As mentioned in the PR, SLOT_TEMP slots may be created during expansion, and by the time the stv pass is run it is hard to find out what are the insn ranges where those temporary slots from expansion are live and thus where we should avoid reusing those even if they have the same mode. The pa

Re: Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2016-12-14 Thread Felipe Magno de Almeida
Hello Jonathan, Sorry for the delay, I was in mid-vacation. Comments are inline. On Tue, Dec 6, 2016 at 3:45 PM, Jonathan Wakely wrote: > On 16/09/16 02:53 -0300, Felipe Magno de Almeida wrote: >> [snip] >> I've tried both approaches. Templates were causing problems of not >> defined instanta

Re: _Rb_tree regression

2016-12-14 Thread François Dumont
On 14/12/2016 12:36, Jonathan Wakely wrote: On 14/12/16 11:27 +, Jonathan Wakely wrote: On 13/12/16 22:51 +0100, François Dumont wrote: I've confirmed that the change fixes these bad test results for C++03 testing: UNRESOLVED: 12 FAIL: 32 Thanks for confirming, now committed. Fr

Re: C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)

2016-12-14 Thread Jason Merrill
OK, thanks. On Wed, Dec 14, 2016 at 12:01 PM, Marek Polacek wrote: > On Wed, Dec 14, 2016 at 11:30:17AM -0500, Jason Merrill wrote: >> On Wed, Dec 14, 2016 at 10:39 AM, Marek Polacek wrote: >> > + if (TREE_CODE (type) == ARRAY_TYPE >> > + && TYPE_DOMAIN (type) == NULL_TREE >> > +

Re: [PATCH, i386]: Put back __builtin_clzs and __builtin_ctzs

2016-12-14 Thread Uros Bizjak
On Wed, Dec 14, 2016 at 4:39 PM, Uros Bizjak wrote: > On Wed, Dec 14, 2016 at 4:33 PM, Jakub Jelinek wrote: >> On Wed, Dec 14, 2016 at 04:30:39PM +0100, Uros Bizjak wrote: >>> Apparently, Qt source uses these two builtins. As the removal brings >>> much pain, I'd like to commit the following patc

Re: [PATCH] Add AVX512 k-mask intrinsics

2016-12-14 Thread Uros Bizjak
On Wed, Dec 14, 2016 at 8:04 PM, Andrew Senkevich wrote: > here is the second part of k-mask intrinsics, is it Ok? > --- a/gcc/config/i386/sse.md > +++ b/gcc/config/i386/sse.md > @@ -1309,12 +1309,30 @@ > ;; Mask variant shift mnemonics > (define_code_attr mshift [(ashift "shiftl") (lshiftrt "

Re: [PATCH] combine: Omit redundant AND in change_zero_ext.

2016-12-14 Thread Segher Boessenkool
On Wed, Dec 14, 2016 at 11:01:47AM +0100, Dominik Vogt wrote: > This is another micro-optimisation in change_zero_ext. If an > > (and (lshiftrt ... (N)) (M)) > > generated by change_zero_ext is equivalent to just > > (lshiftrt ... (N)) > > (because the AND constant selects the N rightmost

Re: [PATCH] Add AVX512 k-mask intrinsics

2016-12-14 Thread Andrew Senkevich
2016-12-02 21:31 GMT+03:00 Uros Bizjak : . . . . . >> >> I split this patch after last updates in md files, here is the first >> part which doesn't change md files. >> Regtested on x86_64-linux-gnu. Is this part ok? > > There is no point to scan for kmovX insn in e.g.: > > +/* { dg-final { scan-as

Re: cprop fix for PR78626

2016-12-14 Thread Segher Boessenkool
On Wed, Dec 14, 2016 at 04:46:09PM +0100, Bernd Schmidt wrote: > That would be this patch. Tested as before. The two new testcases seem > to pass with a ppc cross (but I would appreciate if someone were to run > full tests on ppc). Thanks, will do. Segher

Re: [PATCH][ARM] Remove movdi_vfp_cortexa8

2016-12-14 Thread Wilco Dijkstra
Kyrill Tkachov wrote: > On 14/12/16 16:37, Wilco Dijkstra wrote: > > > Merge the movdi_vfp_cortexa8 pattern into movdi_vfp and remove it to avoid > > unnecessary duplication and repeating bugs like PR78439 due to changes being > > applied only to one of the duplicates. > > When this was brought up

Re: [PATCH] Avoid creating unbounded complexity debug insns in valtrack (PR debug/77844, take 2)

2016-12-14 Thread Segher Boessenkool
On Wed, Dec 14, 2016 at 04:31:19PM +0100, Jakub Jelinek wrote: > > Could you do a gcc_checking_assert (INSN_UID (INSN) <= max_uid_known) > > in the LOG_LINKS and INSN_COST defines? It is hard to check if you > > caught every use. > > Like this? Bootstrapped/regtested again on x86_64-linux and i

Re: [PATCHv3] [AARCH64] Add variant support to -m="native"and add thunderxt88p1.

2016-12-14 Thread James Greenhalgh
On Sat, Nov 26, 2016 at 01:54:34PM -0800, Andrew Pinski wrote: > On Tue, Nov 1, 2016 at 11:08 AM, Andrew Pinski wrote: > > On Tue, Nov 17, 2015 at 2:10 PM, Andrew Pinski wrote: > >> Since ThunderX T88 pass 1 (variant 0) is a ARMv8 part while pass 2 > >> (variant 1) > >> is an ARMv8.1 part, I nee

[arm-embedded][committed] Fix backport of PR71607: no longer use TARGET_USE_BLOCKS_FOR_CONSTANT_P

2016-12-14 Thread Andre Vieira (lists)
Hi, During embedded-6-branch testing we discovered that the patch for PR71607, that I backported to embedded-6-branch, broke cortex-m0 due to the new implementation of TARGET_USE_BLOCKS_FOR_CONSTANT_P. What changed is that TARGET_USE_BLOCKS_FOR_CONSTANT_P did not used to be defined by ARM and thu

Re: C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)

2016-12-14 Thread Marek Polacek
On Wed, Dec 14, 2016 at 11:30:17AM -0500, Jason Merrill wrote: > On Wed, Dec 14, 2016 at 10:39 AM, Marek Polacek wrote: > > + if (TREE_CODE (type) == ARRAY_TYPE > > + && TYPE_DOMAIN (type) == NULL_TREE > > + && init != NULL_TREE) > > + error_at (DECL_SOURCE_LOCATION (cur

Problem with pseudo-reg syntax in RTL frontend

2016-12-14 Thread David Malcolm
The RTL frontend parses the output of print_rtx_function's "compact" mode. Currently non-virtual pseudo regs in such dumps have a '%' prefix, based on the discussion here (me): * " Re: [PATCH] Tweaks to print_rtx_function" * https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01033.html and here (

Re: [PATCH] work around MPFR undefined behavior (PR 78786)

2016-12-14 Thread Martin Sebor
On 12/14/2016 02:25 AM, Andreas Schwab wrote: On Dez 14 2016, Martin Sebor wrote: +#define target_dir_max() (target_int_max () + 4932 + 2) + if (9864 < prec) + prec = 9864; Should these two magic numbers be macroized? I had considered it and didn't think it was worth it (th

Re: [Patch][ARM,AArch64] more poly64 intrinsics and tests

2016-12-14 Thread James Greenhalgh
On Mon, Dec 12, 2016 at 05:03:31PM +0100, Christophe Lyon wrote: > Hi, > > After the recent update from Tamar, I noticed a few discrepancies > between ARM and AArch64 regarding a few poly64 intrinsics. > > This patch: > - adds vtst_p64 and vtstq_p64 to AArch64's arm_neon.h > - adds vgetq_lane_p64

Re: [PATCH][ARM] Remove uses of leaf_function_p

2016-12-14 Thread Kyrill Tkachov
Hi Wilco, On 14/12/16 16:39, Wilco Dijkstra wrote: ping From: Wilco Dijkstra Sent: 05 December 2016 14:52 To: GCC Patches Cc: nd Subject: [PATCH][ARM] Remove uses of leaf_function_p Using leaf_function_p in a backend is dangerous as it incorrectly returns false if it is called while in

Re: [PATCH][AArch64 - v3] Simplify eh_return implementation

2016-12-14 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 02 September 2016 12:31 To: Ramana Radhakrishnan; GCC Patches Cc: nd Subject: Re: [PATCH][AArch64 - v3] Simplify eh_return implementation     Ramana Radhakrishnan wrote: > Can you please file a PR for this and add some testcases ?  This sounds like > a serious

Re: [PATCH][ARM] Remove movdi_vfp_cortexa8

2016-12-14 Thread Kyrill Tkachov
Hi Wilco, On 14/12/16 16:37, Wilco Dijkstra wrote: ping From: Wilco Dijkstra Sent: 29 November 2016 11:05 To: GCC Patches Cc: nd Subject: [PATCH][ARM] Remove movdi_vfp_cortexa8 Merge the movdi_vfp_cortexa8 pattern into movdi_vfp and remove it to avoid unnecessary duplication and

Re: [PATCH] fix integer overflow bugs in gimple-ssa-sprintf.c (PR 78608)

2016-12-14 Thread Martin Sebor
So I've been going back and forth on whether or not to suggest a slight change in how we're working. Specifically the practice of lumping multiple fixes into a single patch -- I realize that it's usually the case that you're finding related issues so there's a desire to address them as a group.

Re: [RFC][PATCH][AArch64] Cleanup frame pointer usage

2016-12-14 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 31 October 2016 18:29 To: GCC Patches Cc: nd Subject: [RFC][PATCH][AArch64] Cleanup frame pointer usage     This patch cleans up all code related to the frame pointer.  On AArch64 we emit a frame chain even in cases where the frame pointer is not required. So m

Re: [PATCH][ARM] Fix ldrd offsets

2016-12-14 Thread Wilco Dijkstra
  ping From: Wilco Dijkstra Sent: 03 November 2016 12:20 To: GCC Patches Cc: nd Subject: [PATCH][ARM] Fix ldrd offsets     Fix ldrd offsets of Thumb-2 - for TARGET_LDRD the range is +-1020, without -255..4091.  This reduces the number of addressing instructions when using DI mode operations

Re: [PATCH][ARM] Remove uses of leaf_function_p

2016-12-14 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 05 December 2016 14:52 To: GCC Patches Cc: nd Subject: [PATCH][ARM] Remove uses of leaf_function_p   Using leaf_function_p in a backend is dangerous as it incorrectly returns false if it is called while in a sequence (for example during prolog/epilog generation

Re: [PATCH][ARM] Improve Thumb allocation order

2016-12-14 Thread Wilco Dijkstra
  ping From: Wilco Dijkstra Sent: 30 November 2016 17:32 To: GCC Patches Cc: nd Subject: [PATCH][ARM] Improve Thumb allocation order     Thumb uses a special register allocation order to increase the use of low registers.  Oddly enough, LR appears before R12, which means that LR must be save

Re: [PATCH][ARM] Improve max_insns_skipped logic

2016-12-14 Thread Wilco Dijkstra
  ping From: Wilco Dijkstra Sent: 10 November 2016 17:19 To: GCC Patches Cc: nd Subject: [PATCH][ARM] Improve max_insns_skipped logic     Improve the logic when setting max_insns_skipped.  Limit the maximum size of IT to MAX_INSN_PER_IT_BLOCK as otherwise multiple IT instructions are needed

Re: [PATCH][ARM] Remove movdi_vfp_cortexa8

2016-12-14 Thread Wilco Dijkstra
  ping From: Wilco Dijkstra Sent: 29 November 2016 11:05 To: GCC Patches Cc: nd Subject: [PATCH][ARM] Remove movdi_vfp_cortexa8     Merge the movdi_vfp_cortexa8 pattern into movdi_vfp and remove it to avoid unnecessary duplication and repeating bugs like PR78439 due to changes being applied

Re: [PATCH][ARM] Merge negdi2 patterns

2016-12-14 Thread Wilco Dijkstra
  ping From: Wilco Dijkstra Sent: 30 November 2016 17:39 To: GCC Patches Cc: nd; Bernd Edlinger Subject: [PATCH][ARM] Merge negdi2 patterns     The negdi2 patterns for ARM and Thumb-2 are duplicated because Thumb-2 doesn't support RSC with an immediate.  We can however emulate RSC with zero

Re: [PATCH][C++] Fix PR71694, store data race with tail-padding

2016-12-14 Thread Jason Merrill
OK, thanks. On Wed, Dec 14, 2016 at 5:44 AM, Richard Biener wrote: > > The following implements Jasons suggestion of using a langhook to > return the size of an aggregate without tail padding that might > be re-used when it is inherited from. > > Using this langhook we can fix the size of the rep

Re: [C++ PATCH] c++/78701 ICE in default arg unification

2016-12-14 Thread Jason Merrill
OK. On Wed, Dec 14, 2016 at 9:05 AM, Nathan Sidwell wrote: > This patch fixes 78701. The problematic case with a non-type template arg > whose default value is dependent on a previous non-type arg that failed to > be deduced on the first iteration of the loop in type_unification_real. > > Just b

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-14 Thread Jason Merrill
Yes, thanks. On Wed, Dec 14, 2016 at 7:51 AM, Nathan Sidwell wrote: > On 12/13/2016 03:58 PM, Jason Merrill wrote: > >> I'm still seeing the redundant DECL_LANG_SPECIFIC check. > > > Sorry, I misunderstood which check you meant was redundant. In the original > patch, the first check wasn't redun

Re: C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)

2016-12-14 Thread Jason Merrill
On Wed, Dec 14, 2016 at 10:39 AM, Marek Polacek wrote: > + if (TREE_CODE (type) == ARRAY_TYPE > + && TYPE_DOMAIN (type) == NULL_TREE > + && init != NULL_TREE) > + error_at (DECL_SOURCE_LOCATION (current_function_decl), > + "member initializer for flexible

[PATCH] Make printers use singular noun for a single element

2016-12-14 Thread Jonathan Wakely
This fixes the fact that our pretty printers say ungrammatical things like "std::vector with 1 elements" * python/libstdcxx/v6/printers.py (num_elements): New function. (StdMapPrinter.to_string, StdSetPrinter.to_string) (StdDequePrinter.to_string, Tr1UnorderedSetPrinter.to

Re: cprop fix for PR78626

2016-12-14 Thread Bernd Schmidt
On 12/12/2016 03:21 PM, Bernd Schmidt wrote: On 12/10/2016 08:58 PM, Segher Boessenkool wrote: On Thu, Dec 08, 2016 at 01:21:04PM +0100, Bernd Schmidt wrote: This is another case where an optimization turns a trap_if unconditional. We have to defer changing the CFG, since the rest of cprop seem

Re: C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)

2016-12-14 Thread Marek Polacek
On Wed, Dec 14, 2016 at 09:04:01AM -0500, Jason Merrill wrote: > On Wed, Dec 14, 2016 at 8:16 AM, Marek Polacek wrote: > > + if (TREE_CODE (type) == ARRAY_TYPE > > + && TYPE_DOMAIN (type) == NULL_TREE > > + && init != NULL_TREE) > > + error_at (DECL_SOURCE_LOCATION (memb

Re: [PATCH, i386]: Put back __builtin_clzs and __builtin_ctzs

2016-12-14 Thread Uros Bizjak
On Wed, Dec 14, 2016 at 4:33 PM, Jakub Jelinek wrote: > On Wed, Dec 14, 2016 at 04:30:39PM +0100, Uros Bizjak wrote: >> Apparently, Qt source uses these two builtins. As the removal brings >> much pain, I'd like to commit the following patch to restore >> __builtin_clzs and __builtin_ctzs on gcc-6

Re: [PATCH, i386]: Put back __builtin_clzs and __builtin_ctzs

2016-12-14 Thread Jakub Jelinek
On Wed, Dec 14, 2016 at 04:30:39PM +0100, Uros Bizjak wrote: > Apparently, Qt source uses these two builtins. As the removal brings > much pain, I'd like to commit the following patch to restore > __builtin_clzs and __builtin_ctzs on gcc-6 branch. > > 2016-12-14 Uros Bizjak > > PR target/5

[PING][PATCH][ARM]Use different startfile and endfile for elf target when generating shared object.

2016-12-14 Thread Renlin Li
Ping~ Regards, Renlin On 16/06/16 12:04, Renlin Li wrote: Hi all, GCC has startfile and endfile spec string built into it. startfile is used to specify objects files to include at the start of the link process. While endfile, on the other hand, is used to specify objects files to include at

Re: [PATCH] Avoid creating unbounded complexity debug insns in valtrack (PR debug/77844, take 2)

2016-12-14 Thread Jakub Jelinek
On Wed, Dec 14, 2016 at 03:36:23AM -0600, Segher Boessenkool wrote: > On Wed, Dec 14, 2016 at 09:34:44AM +0100, Jakub Jelinek wrote: > > Here is updated patch that does that. I had to change the combiner > > in a couple of places, because combiner is very unhappy if new instructions > > (with uids

[PATCH, i386]: Put back __builtin_clzs and __builtin_ctzs

2016-12-14 Thread Uros Bizjak
Apparently, Qt source uses these two builtins. As the removal brings much pain, I'd like to commit the following patch to restore __builtin_clzs and __builtin_ctzs on gcc-6 branch. 2016-12-14 Uros Bizjak PR target/59874 * config/i386/i386.c (enum ix86_builtins): Add IX86_BUILTIN_CLZS

Re: [ARM] PR 78253 do not resolve weak ref locally

2016-12-14 Thread Christophe Lyon
Ping^2 ? As a reminder, this patch mimics what aarch64 does wrt to references to weak symbols such that they are not resolved by the assembler, in case a strong definition overrides the local one at link time. Christophe On 8 December 2016 at 09:17, Christophe Lyon wrote: > Ping? > > On 1 Dece

[PATCH] combine: Simplify "(and (subreg (zero_extract" in change_zero_ext.

2016-12-14 Thread Dominik Vogt
The attached patch takes care of the problem described below. (I tried to stick the new code into the regular combine-simplify stuff, but that does not work well. At the time when combine_simplify_rtx is called, it's not known whether change_zero_ext will expand the ZERO_EXTRACT to "(and (lshiftr

[PATCH] Make printers detect invalid debug mode iterators

2016-12-14 Thread Jonathan Wakely
This is a partial fix for PR 59170, using the debug mode iterator's members to tell when it's invalid. This doesn't detect past-the-end iterators, and doesn't help for normal mode where we don't have the extra info (but we can still detect value-initialized iterators for normal mode and not ry to

Re: [committed] Fix for PR preprocessor/78680

2016-12-14 Thread David Malcolm
++-compat (test for excess > errors) > Excess errors: > /usr/local/gcc/gcc-20161214/gcc/testsuite/c-c++-common/raw-string > -6.c:5:1: internal compiler error: Segmentation fault > 0x4108571f crash_signal > ../../gcc/toplev.c:333 > 0x42024dcf _cpp_process_

Re: [PATCH] Add ISA 3.0 PowerPC support for VEXTU{B,H,W}{L,R}X instructions

2016-12-14 Thread Segher Boessenkool
On Wed, Dec 14, 2016 at 09:45:12AM -0500, Michael Meissner wrote: > I looked at the code once again, and in the cases that call the function, they > always create a GPR temporary register, so I didn't need to reuse the > destination register. Thanks for the comments. Are these patches ok to check

[PATCH, testsuite] MIPS: Cleanup the forcing of assembly output in error tests.

2016-12-14 Thread Toma Tabacu
Hi, Some error tests were forcing assembly output incorrectly, and none of them had an explanation for why they were using -ffat-lto-objects. This patch removes dg-skip-if's for -fno-fat-lto-objects and adds -ffat-lto-objects to the test options instead. It also adds an explanation for the purpos

RE: [PATCH, testsuite] MIPS: Remove redundant dg-skip-if from mips16-attributes.c.

2016-12-14 Thread Toma Tabacu
Committed as r243649. Regards, Toma > Toma Tabacu writes: > > In the case of mips16-attributes.c, even though the (-mips16) option ensures > > that -mmicromips will be overriden, there still is a dg-skip-if for > > -mmicromips. > > > > I think that it is not necessary and it actually decreases t

Re: [PATCH] Add ISA 3.0 PowerPC support for VEXTU{B,H,W}{L,R}X instructions

2016-12-14 Thread Michael Meissner
On Tue, Dec 13, 2016 at 07:02:48PM -0600, Segher Boessenkool wrote: > On Tue, Dec 13, 2016 at 06:17:17PM -0500, Michael Meissner wrote: > > > > + else if (mode == V8HImode) > > > > + { > > > > + rtx tmp_gpr_si = (GET_CODE (tmp_gpr) == SCRATCH > > > > +

[C++ PATCH] c++/78701 ICE in default arg unification

2016-12-14 Thread Nathan Sidwell
This patch fixes 78701. The problematic case with a non-type template arg whose default value is dependent on a previous non-type arg that failed to be deduced on the first iteration of the loop in type_unification_real. Just before the tsubst_template_arg we've already done: if (T

Re: C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)

2016-12-14 Thread Jason Merrill
On Wed, Dec 14, 2016 at 8:16 AM, Marek Polacek wrote: > + if (TREE_CODE (type) == ARRAY_TYPE > + && TYPE_DOMAIN (type) == NULL_TREE > + && init != NULL_TREE) > + error_at (DECL_SOURCE_LOCATION (member), > + "initialization of a flexible array member in a

Re: PR target/78213 revisited (was Re: [PATCH 5/9] Introduce selftest::locate_file (v4))

2016-12-14 Thread Bernd Schmidt
On 12/09/2016 08:32 PM, David Malcolm wrote: Thanks. Unfortunately, applying the "locate_file" patch https://gcc.gnu.org/ml/gcc-patches/2016-11/msg01186.html would now introduce a regression in a recently-added test case: The problem is that this DejaGnu test case uses -fself-test, and does

GCC 6.3 Status Report (2016-12-14)

2016-12-14 Thread Jakub Jelinek
Status == The GCC 6 branch is now frozen for blocking regressions and documentation fixes only, all changes to the branch require a RM approval now. Quality Data Priority # Change from last report --- --- P10 P2

Re: [PATCH] omp-low.c split

2016-12-14 Thread Martin Jambor
Hi, On Wed, Dec 14, 2016 at 02:14:32PM +0100, Thomas Schwinge wrote: > > I still couldn't allocate time to review the patch, but at least I now > have tested it -- no regressions. Great, thanks! > As I suppose you want to commit this > as sooner than later ;-) and you already have approval as I

Re: C++ PATCH to reject initializating flexible array members in constructors (PR c++/72775)

2016-12-14 Thread Marek Polacek
On Thu, Dec 08, 2016 at 02:56:56PM -0500, Nathan Sidwell wrote: > On 12/08/2016 01:05 PM, Jason Merrill wrote: > > If the problem is the member initializer, we can diagnose that > > directly rather than wait until we're in a constructor. > > What about: > struct Foo { > int a; > char ary[]; > Foo

Re: [PATCH] omp-low.c split

2016-12-14 Thread Thomas Schwinge
Hi! On Tue, 13 Dec 2016 13:42:23 +0100, Martin Jambor wrote: > On Tue, Dec 13, 2016 at 12:43:16PM +0100, Jakub Jelinek wrote: > > On Tue, Dec 13, 2016 at 12:39:01PM +0100, Thomas Schwinge wrote: > > > On Fri, 9 Dec 2016 14:08:21 +0100, Martin Jambor wrote: > > > > this is the promised attempt at

RE: [PATCH, testsuite] MIPS: Upgrade to R2 for -mmicromips.

2016-12-14 Thread Matthew Fortune
Toma Tabacu writes: > microMIPS is not supported on pre-R2 architectures, but the testsuite allows > it to be used on pre-R2 architectures, which results in test failures. > > This patch makes the testsuite upgrade to R2 if -mmicromips is used in a test. > > Tested with mips-mti-elf. > > Regard

Re: [PATCH 3/4] [ARC] Refurbish mul64 support.

2016-12-14 Thread Andrew Burgess
* Claudiu Zissulescu [2016-11-16 11:18:00 +0100]: > gcc/ > 2016-07-04 Claudiu Zissulescu > > * config/arc/arc.md (mulsidi_600): Changed. > (umulsidi_600): Likewise. > (mul64): New pattern. > (mulu64): Likewise. > (mulsidi3): Changed. > (umulsidi3): Likewis

RE: [PATCH, testsuite] MIPS: Remove redundant dg-skip-if from mips16-attributes.c.

2016-12-14 Thread Matthew Fortune
Toma Tabacu writes: > In the case of mips16-attributes.c, even though the (-mips16) option ensures > that -mmicromips will be overriden, there still is a dg-skip-if for > -mmicromips. > > I think that it is not necessary and it actually decreases test coverage, > because it will cause the testsu

Re: [build] Handle gas/gld --compress-debug-sections=type

2016-12-14 Thread Rainer Orth
Hi Matthias, > From my point of view this should be backported to the active branches. > Building GCC 5 and GCC 6 with binutils >=2.26 now results in > > $ gcc -c -gz foo.c > gcc: error: -gz is not supported in this configuration > > building these GCC version with binutils 2.25 recognizes this op

Re: [C++ PATCH] c++/78776 fix alias template ICE

2016-12-14 Thread Nathan Sidwell
On 12/13/2016 03:58 PM, Jason Merrill wrote: I'm still seeing the redundant DECL_LANG_SPECIFIC check. Sorry, I misunderstood which check you meant was redundant. In the original patch, the first check wasn't redundant (but the second check was entirely within the codepath of the first). Bu

Re: [PATCH, Fortran, pr78780, v1] [7 Regression] [Coarray] ICE in conv_caf_send, at fortran/trans-intrinsic.c:1936

2016-12-14 Thread Andre Vehreschild
Hi Steve, hi all, thanks for the review. While going to bed, it came to me that the testcase checks only half of result of this patch. I therefore took the liberty to add another testcase, that checks that the other part of the change is also tested as testsuite/gfortran.dg/coarray_42.f90. The ch

[PATCH] combine: Replace sign_extend with zero_extend more often.

2016-12-14 Thread Dominik Vogt
There may be a slight imprecision in expand_compound_operation. When it encounters a SIGN_EXTEND where it's already known that the sign bit is zero, it may replace that with a ZERO_EXTEND (and tries to simplify that further). However, the pattern is only replaced if the new set_src_cost() is _lowe

Re: [committed] Fix for PR preprocessor/78680

2016-12-14 Thread James Greenhalgh
On Wed, Dec 14, 2016 at 11:54:21AM +0100, Andreas Schwab wrote: > This crashes the compiler on ia64. > > FAIL: c-c++-common/raw-string-6.c -Wc++-compat (test for excess errors) > Excess errors: > /usr/local/gcc/gcc-20161214/gcc/testsuite/c-c++-common/raw-string-6.c:5:1: >

Re: [PATCH] Optimiza aggregate a = b = c = {} (PR c/78408)

2016-12-14 Thread Richard Biener
On Tue, 13 Dec 2016, Jakub Jelinek wrote: > Hi! > > Sorry for not getting to this earlier. > > On Mon, Nov 28, 2016 at 10:50:26AM +0100, Richard Biener wrote: > > > + else if (gimple_call_builtin_p (defstmt, BUILT_IN_MEMSET) > > > +&& TREE_CODE (gimple_call_arg (defstmt, 0)) == ADDR_EXPR >

Re: [PATCH 2/2] [ARC] Remove old prof patterns.

2016-12-14 Thread Andrew Burgess
* Claudiu Zissulescu [2016-12-05 12:59:13 +0100]: > Cleanup old patterns. > > gcc/ > 2016-10-10 Claudiu Zissulescu > > * config/arc/arc.md (call_prof): Remove. > (call_value_prof): Likewise. > (sibcall_prof): Likewise. > (sibcall_value_prof): Likewise. Looks fine.

Re: [PATCH 1/2] [ARC] Generating code for profiling.

2016-12-14 Thread Andrew Burgess
* Claudiu Zissulescu [2016-12-05 12:59:12 +0100]: > Remove old gmonlib from libgcc and reimplemnt profiling using UCB > counters. > > gcc/ > 2016-07-28 Claudiu Zissulescu > > * config/arc/arc.h (LINK_SPEC): Tidy up. > (ENDFILE_SPEC): Likewise. > (LIB_SPEC): Likewise. >

Re: [PR78365] ICE in determine_value_range, at tree-ssa-loo p-niter.c:413

2016-12-14 Thread Richard Biener
On Wed, Dec 14, 2016 at 11:15 AM, Martin Jambor wrote: > Hi, > > On Fri, Dec 09, 2016 at 01:18:25PM +0100, Richard Biener wrote: >> >> The patch looks somewhat backward. It populates the param type from >> the callee but the only thing we really know is the _originating_ type >> from the callers

Re: [PATCH, Fortran, pr78672, ctp1, v2] Gfortran test suite failures with a sanitized compiler

2016-12-14 Thread Andre Vehreschild
Hi all, thanks for the input and reviews. I have committed this patch as r243647. Regards, Andre On Sun, 11 Dec 2016 15:49:33 +0100 Paul Richard Thomas wrote: > Hi Andre, > > Thanks for doing this work with the instrumented compiler. It was a > great help with PR78350. > > As for the

Re: _Rb_tree regression

2016-12-14 Thread Jonathan Wakely
On 14/12/16 11:27 +, Jonathan Wakely wrote: On 13/12/16 22:51 +0100, François Dumont wrote: Hi I have been reported privately by Christophe in copy a regression resulting from my recent changes to _Rb_tree. I removed a constructor still necessary in C++03 mode or before. Tests would ha

Re: _Rb_tree regression

2016-12-14 Thread Jonathan Wakely
On 14/12/16 11:27 +, Jonathan Wakely wrote: On 13/12/16 22:51 +0100, François Dumont wrote: Hi I have been reported privately by Christophe in copy a regression resulting from my recent changes to _Rb_tree. I removed a constructor still necessary in C++03 mode or before. Tests would ha

Re: _Rb_tree regression

2016-12-14 Thread Jonathan Wakely
On 13/12/16 22:51 +0100, François Dumont wrote: Hi I have been reported privately by Christophe in copy a regression resulting from my recent changes to _Rb_tree. I removed a constructor still necessary in C++03 mode or before. Tests would have shown it if I had run them in C++03. For re

[PATCH, testsuite] MIPS: Upgrade to R2 for -mmicromips.

2016-12-14 Thread Toma Tabacu
Hi, microMIPS is not supported on pre-R2 architectures, but the testsuite allows it to be used on pre-R2 architectures, which results in test failures. This patch makes the testsuite upgrade to R2 if -mmicromips is used in a test. Tested with mips-mti-elf. Regards, Toma gcc/testsuite/ChangeLog

Re: [committed] Fix for PR preprocessor/78680

2016-12-14 Thread Andreas Schwab
This crashes the compiler on ia64. FAIL: c-c++-common/raw-string-6.c -Wc++-compat (test for excess errors) Excess errors: /usr/local/gcc/gcc-20161214/gcc/testsuite/c-c++-common/raw-string-6.c:5:1: internal compiler error: Segmentation fault 0x4108571f crash_signal ../../gcc

[PATCH, testsuite] MIPS: Remove redundant dg-skip-if from mips16-attributes.c.

2016-12-14 Thread Toma Tabacu
Hi, In the case of mips16-attributes.c, even though the (-mips16) option ensures that -mmicromips will be overriden, there still is a dg-skip-if for -mmicromips. I think that it is not necessary and it actually decreases test coverage, because it will cause the testsuite to skip this test instead

[PATCH][C++] Fix PR71694, store data race with tail-padding

2016-12-14 Thread Richard Biener
The following implements Jasons suggestion of using a langhook to return the size of an aggregate without tail padding that might be re-used when it is inherited from. Using this langhook we can fix the size of the representative for the bitfield properly and thus generate correct code for the t

Re: [PATCH] Fix PR71632

2016-12-14 Thread Jakub Jelinek
On Wed, Dec 14, 2016 at 11:38:29AM +0100, Richard Biener wrote: > > The following prevents expand_cond_expr_using_cmove from going berzerk > with a large TER tree containing several cond-exprs that eventually > end up failing expansion as cmove. The attempt to re-do TER failed > somehow earlier t

[PATCH] Fix PR71632

2016-12-14 Thread Richard Biener
The following prevents expand_cond_expr_using_cmove from going berzerk with a large TER tree containing several cond-exprs that eventually end up failing expansion as cmove. The attempt to re-do TER failed somehow earlier this year so the following is a simple stop-gap solution. Bootstrap & regt

RE: [PATCH, testsuite] MIPS: Skip msa-builtins-err.c if there is no assembly output.

2016-12-14 Thread Toma Tabacu
Committed as r243639. Regards, Toma > -Original Message- > From: Matthew Fortune > Sent: 13 December 2016 13:46 > To: Toma Tabacu; gcc-patches@gcc.gnu.org > Cc: catherine_mo...@mentor.com > Subject: RE: [PATCH, testsuite] MIPS: Skip msa-builtins-err.c if there is no > assembly output. >

Re: [PR78365] ICE in determine_value_range, at tree-ssa-loo p-niter.c:413

2016-12-14 Thread Martin Jambor
Hi, On Fri, Dec 09, 2016 at 01:18:25PM +0100, Richard Biener wrote: > > The patch looks somewhat backward. It populates the param type from > the callee but the only thing we really know is the _originating_ type > from the callers DECL_ARGUMENTS (if the JF is based on a parameter > which is the

[PATCH] combine: Omit redundant AND in change_zero_ext.

2016-12-14 Thread Dominik Vogt
This is another micro-optimisation in change_zero_ext. If an (and (lshiftrt ... (N)) (M)) generated by change_zero_ext is equivalent to just (lshiftrt ... (N)) (because the AND constant selects the N rightmost bits of the result), strip off the AND. _But_ I'm still not completely convince

Re: [PATCH, GCC/ARM] Define arm_arch_core_flags in a single file

2016-12-14 Thread Christophe Lyon
Hi Thomas, On 9 December 2016 at 17:56, Thomas Preudhomme wrote: > Hi, > > This patch moves the definition of arm_arch_core_flags along with the > declaration of its structure element type to common/config/arm/arm-common.c > so that it is not *defined* in all object files including tm.h. Otherwis

Re: [6 PATCH][aarch64] Fix TLS handling in -mcmodel=large (PR target/78796)

2016-12-14 Thread James Greenhalgh
On Wed, Dec 14, 2016 at 09:24:18AM +0100, Jakub Jelinek wrote: > Hi! > > GCC before r237607 used to mishandle TLS in -mcmodel=large - forcing > TLS symbols in constant pool, which obviously doesn't work, because they > aren't constant. For all other models aarch64_tls_symbol_p is checked > first.

Re: [PATCH] Avoid creating unbounded complexity debug insns in valtrack (PR debug/77844, take 2)

2016-12-14 Thread Segher Boessenkool
On Wed, Dec 14, 2016 at 09:34:44AM +0100, Jakub Jelinek wrote: > Here is updated patch that does that. I had to change the combiner > in a couple of places, because combiner is very unhappy if new instructions > (with uids above the highest) are inserted into the insn stream, > e.g. FOR_EACH_LOG_L

  1   2   >