Re: [v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Ville Voutilainen
On 13 January 2017 at 09:56, Ville Voutilainen wrote: >> problem with just going through all of them and splicing the contents >> (if any) back to *this? > > Well, in addition to the computational complexity of it, not knowing > which elements should be spliced > back where. If a comparator given

Re: [v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Tim Song
On Fri, Jan 13, 2017 at 3:00 AM, Ville Voutilainen wrote: > On 13 January 2017 at 09:56, Ville Voutilainen > wrote: >>> problem with just going through all of them and splicing the contents >>> (if any) back to *this? >> >> Well, in addition to the computational complexity of it, not knowing >> w

Re: [v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Ville Voutilainen
On 13 January 2017 at 10:02, Tim Song wrote: > On Fri, Jan 13, 2017 at 3:00 AM, Ville Voutilainen > wrote: >> On 13 January 2017 at 09:56, Ville Voutilainen >> wrote: problem with just going through all of them and splicing the contents (if any) back to *this? >>> >>> Well, in addition

Re: [PATCH][GIMPLE FE] Add parsing of MEM_REFs

2017-01-13 Thread Richard Biener
On Thu, 12 Jan 2017, Richard Biener wrote: > On Thu, 12 Jan 2017, Jakub Jelinek wrote: > > > On Thu, Jan 12, 2017 at 01:35:32PM +0100, Richard Biener wrote: > > > It also lacks expressiveness when comparing > > > > > > short s; > > > s_1 = (short) 1; > > > s_2 = short (1); > > > > > > IMH

[PATCH][PR sanitizer/78887] Don't emit ODR indicators if -fsanitize=kernel-address is present.

2017-01-13 Thread Maxim Ostapenko
Hi, as mentioned in PR, Linux kernel 4.9 fails to build with ASan due to wrong handling of emitted ODR indicator symbols. Although this might be a kernel bug (relying on specific pattern in symbol name sounds questionable), kernel doesn't need ODR indicators at all thus we can just disable th

Re: [PATCH] Introduce --with-gcc-major-version-only configure option (take 2)

2017-01-13 Thread Richard Biener
On Thu, Jan 12, 2017 at 9:16 PM, Jakub Jelinek wrote: > Hi! > > On Tue, Jan 10, 2017 at 07:56:36AM +0100, Jakub Jelinek wrote: >> As I said on IRC, I think -dumpversion of 7 in this configuration is the >> right thing to do. In GCC sources, we have 3 uses of -dumpversion, >> two of them look like

Re: [PATCH][GIMPLE FE] Add parsing of MEM_REFs

2017-01-13 Thread Jakub Jelinek
On Fri, Jan 13, 2017 at 09:15:22AM +0100, Richard Biener wrote: > > @@ -1710,6 +1716,24 @@ dump_generic_node (pretty_printer *pp, t > > print_hex (val, pp_buffer (pp)->digit_buffer); > > pp_string (pp, pp_buffer (pp)->digit_buffer); > > } > > + if ((flags & TDF_GIMPLE) > > +

Re: [PATCH][PR sanitizer/78887] Don't emit ODR indicators if -fsanitize=kernel-address is present.

2017-01-13 Thread Jakub Jelinek
On Fri, Jan 13, 2017 at 11:19:19AM +0300, Maxim Ostapenko wrote: > as mentioned in PR, Linux kernel 4.9 fails to build with ASan due to wrong > handling of emitted ODR indicator symbols. Although this might be a kernel > bug (relying on specific pattern in symbol name sounds questionable), kernel >

Re: [PATCH][GIMPLE FE] Add parsing of MEM_REFs

2017-01-13 Thread Richard Biener
On Fri, 13 Jan 2017, Jakub Jelinek wrote: > On Fri, Jan 13, 2017 at 09:15:22AM +0100, Richard Biener wrote: > > > @@ -1710,6 +1716,24 @@ dump_generic_node (pretty_printer *pp, t > > > print_hex (val, pp_buffer (pp)->digit_buffer); > > > pp_string (pp, pp_buffer (pp)->digit_buffer); > > >

Re: [v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Ville Voutilainen
On 13 January 2017 at 10:09, Ville Voutilainen wrote: >>> Ah, I think I see what you're saying. Just splice them back in any >>> order. Ok, I'll give that a spin. >> >> Right, list::sort doesn't promise strong exception safety, so >> "unsorting" is not needed. >> >> Also, shouldn't merge() rethrow

Re: [v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Ville Voutilainen
On 13 January 2017 at 10:27, Ville Voutilainen wrote: > On 13 January 2017 at 10:09, Ville Voutilainen > wrote: Ah, I think I see what you're saying. Just splice them back in any order. Ok, I'll give that a spin. >>> >>> Right, list::sort doesn't promise strong exception safety, so >>>

Re: [v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Ville Voutilainen
On 13 January 2017 at 10:29, Ville Voutilainen wrote: > ..and yes, sigh, that patch has whitespace damage in it. I have > already fixed that, so that'll be corrected before > committing. ..as well as replacing those asserts with VERIFY.

Re: [v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Tim Song
On Fri, Jan 13, 2017 at 3:27 AM, Ville Voutilainen wrote: > On 13 January 2017 at 10:09, Ville Voutilainen > wrote: Ah, I think I see what you're saying. Just splice them back in any order. Ok, I'll give that a spin. >>> >>> Right, list::sort doesn't promise strong exception safety, so

Re: [RFA][PATCH 1a/4] [PR tree-optimization/33562] New sbitmap functions

2017-01-13 Thread Richard Biener
On Fri, Jan 13, 2017 at 4:36 AM, Jeff Law wrote: > Per Richi's request, this breaks out the new sbitmap functions into their > own patch. > > This patch should address all the concerns Richi raised in the prior review. > Namely the performance of the range set/clear and bootstrapping with older >

Re: [PATCH] Fix PR77283

2017-01-13 Thread Richard Biener
On Thu, 12 Jan 2017, Jeff Law wrote: > On 01/12/2017 07:55 AM, Richard Biener wrote: > > > > The following fixes PR77283, path splitting being overly aggressive > > and causing loop unrolling not to happen (because how it distorts the > > CFG). > > > > It is a aim at creating a cost model (there

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

2017-01-13 Thread Christophe Lyon
Hi Renlin, On 12 January 2017 at 16:50, Renlin Li wrote: > Hi Kugan, > > some of the targets do include pie, and use the same crtbegin file as shared > object. > For example, alpha/elf.h > > And there are targets which don't do that, > For example, sh/elf.h > > Most of the elf target seem only c

Re: [PATCH][PR sanitizer/78887] Don't emit ODR indicators if -fsanitize=kernel-address is present.

2017-01-13 Thread Maxim Ostapenko
On 13/01/17 11:24, Jakub Jelinek wrote: On Fri, Jan 13, 2017 at 11:19:19AM +0300, Maxim Ostapenko wrote: as mentioned in PR, Linux kernel 4.9 fails to build with ASan due to wrong handling of emitted ODR indicator symbols. Although this might be a kernel bug (relying on specific pattern in symbo

Re: [PATCH][PR sanitizer/78887] Don't emit ODR indicators if -fsanitize=kernel-address is present.

2017-01-13 Thread Jakub Jelinek
On Fri, Jan 13, 2017 at 12:01:54PM +0300, Maxim Ostapenko wrote: > +of symbols they are emmitted for, these assumptions would be broken > for emitted rather than emmitted. > +ODR indicator symbols. */ > + return (!(flag_sanitize & SANITIZE_KERNEL_ADDRESS) > + && !DECL_ART

[PATCH] Fix gcc.dg/tree-ssa/scev-[345].c testcases

2017-01-13 Thread Richard Biener
The following is an attempt to change those testcases to be less dependent on previous passes. The original motivation of the testcases seems to be testing SCEV capabilities and in turn IVOPTs decisions, thus the testcases are changed to check the IVO dump, use the GIMPLE FE feeding the loop pipe

[Ada] Static predicates on strings

2017-01-13 Thread Arnaud Charlet
RM 3.2.4 stipulates that comparison operators on strings are legal in the expression for a Static_Predicate aspect of a string type. The implementation of this capability was deferred because it conflicts with the definition of static expression (RM 4.9) which excludes string comparisons from stati

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

2017-01-13 Thread Renlin Li
Hi Christophe, Thanks for testing the patch! I check the test case gcc.dg/lto/pr54709, it seems the test case is not properly written. It add extra ld option -shared without checking the target support for that. After the change, this compilation will fail as a regression. IIUC, '-shared' opt

Re: [PATCH, Fortran, pr70696, v1] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-13 Thread Andre Vehreschild
Hi Jerry, thanks for the review. Committed as r244407. Will backport to gcc-6 in a week or so. Regards, Andre On Thu, 12 Jan 2017 10:11:37 -0800 Jerry DeLisle wrote: > On 01/12/2017 03:45 AM, Andre Vehreschild wrote: > > Hi all, > > > > attached patch fixes the ICE when using an even

Re: [PATCH, Fortran, pr70697, v1] [Coarray] ICE on EVENT WAIT with array element UNTIL_COUNT argument

2017-01-13 Thread Andre Vehreschild
Hi Jerry, thanks again for the fast review. Committed as r244413. Will backport to gcc-6 in about a week. Regards, Andre On Thu, 12 Jan 2017 10:12:24 -0800 Jerry DeLisle wrote: > On 01/12/2017 05:43 AM, Andre Vehreschild wrote: > > Hi all, > > > > *** this is no duplicate, but +1 in

Restore Solaris/SPARC Ada bootstrap

2017-01-13 Thread Rainer Orth
This patch (which I didn't see on gcc-patches) r244367 | charlet | 2017-01-12 16:57:45 +0100 (Thu, 12 Jan 2017) | 2 lines Changed paths: M /trunk/gcc/ada/ChangeLog M /trunk/gcc/ada/gcc-interface/Makefile.in * gcc-interface/Makefile.in: Clean up VxWorks targets. included a typo whic

Re: Restore Solaris/SPARC Ada bootstrap

2017-01-13 Thread Arnaud Charlet
> * gcc-interface/Makefile.in: Clean up VxWorks targets. > > included a typo which broke Solaris/SPARC bootstrap: > > gcc-interface/Makefile:1274: *** missing separator. Stop. > make[3]: Leaving directory > '/var/gcc/regression/trunk/12-gcc/build/gcc/ada' > Makefile:122: recipe for targe

[Ada] Expression functions as completions and private types

2017-01-13 Thread Arnaud Charlet
An expression function that is a completion is a freeze point for all entities referenced in its expression. As a consequence, a reference to an uncompleted private type declared in an enclosing scope is illegal. This patch adds the proper check to enforce this rule. Compiling env_baselines.ads mu

Re: [PATCH] Fix assertions along default switch labels (PR tree-optimization/78819)

2017-01-13 Thread Marek Polacek
On Fri, Dec 16, 2016 at 03:16:14PM +0100, Marek Polacek wrote: > On Fri, Dec 16, 2016 at 02:58:59PM +0100, Richard Biener wrote: > > On Fri, Dec 16, 2016 at 2:03 PM, Bernd Schmidt wrote: > > > On 12/16/2016 12:49 PM, Marek Polacek wrote: > > > > > >> But as this testcase shows, this breaks when th

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

2017-01-13 Thread Christophe Lyon
On 13 January 2017 at 11:22, Renlin Li wrote: > Hi Christophe, > > Thanks for testing the patch! > I check the test case gcc.dg/lto/pr54709, it seems the test case is not > properly written. > > It add extra ld option -shared without checking the target support for that. > After the change, this c

Re: [PATCH] Fix gcc.dg/tree-ssa/scev-[345].c testcases

2017-01-13 Thread Bin.Cheng
On Fri, Jan 13, 2017 at 9:46 AM, Richard Biener wrote: > > The following is an attempt to change those testcases to be less dependent > on previous passes. The original motivation of the testcases seems to be > testing SCEV capabilities and in turn IVOPTs decisions, thus the testcases > are chang

[Ada] Spurious dimensional error in SPARK mode

2017-01-13 Thread Arnaud Charlet
THis patch removes a spurious error on mismatched dimensions in the body of a subprogram that is inlined for SPARK purposes. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-01-13 Ed Schonberg * sem_ch8.adb (Analyze_Expanded_Name): Perfrom dimension analysis even if enti

[Ada] Inlining of expression function returning controlled object

2017-01-13 Thread Arnaud Charlet
Pragma Inline_Always has been extended to support inlining of calls to expression functions that return a controlled object if the expression function fulfills all the following requirements: 1. Has pragma/aspect Inline_Always 2. Has no formals 3. Has no contracts 4. Has no dispatching prim

[PATCH] Adjust gcc.target/i386/pr45685.c testcase

2017-01-13 Thread Richard Biener
This makes it pass again. Tested on x86_64-unknown-linux-gnu. Richard. 2017-01-13 Richard Biener PR middle-end/78411 * gcc.target/i386/pr45685.c: Add -ftree-loop-if-convert. Index: gcc/testsuite/gcc.target/i386/pr45685.c =

PR79066, non-PIC code generated for powerpc glibc with -fpic

2017-01-13 Thread Alan Modra
Bootstrapped and regression tested powerpc64-linux biarch. elf_high has said "Elf specific ways of loading addresses for non-PIC code" ^^^ right from the inital V4 support in 1995. OK for mainline? PR target/79066 * config/

Avoid PR72749 by not using unspecs

2017-01-13 Thread Alan Modra
Rather than using unspecs in doloop insns to stop combine creating these insns, use legitimate_combined_insn. I'm not sure why the original patch implementing legitimate_combined_insn did not store the result of recog to the insn but it seems good to me, and would allow the recog call in ix86_legi

Re: [PATCH] builtin expansion of strncmp for rs6000

2017-01-13 Thread Tulio Magno Quites Machado Filho
Segher Boessenkool writes: > On Thu, Jan 12, 2017 at 05:53:06PM +, Joseph Myers wrote: >> On Thu, 15 Dec 2016, Aaron Sawdey wrote: >> >> > + emit_library_call_value (gen_rtx_SYMBOL_REF (Pmode, "strncmp"), >> > + target, LCT_NORMAL, GET_MODE (target), 3, >> > +

[patch,avr]: For PR78883 #3

2017-01-13 Thread Georg-Johann Lay
This is 3rd way to fix PR78883 by rejecting malicious expressions from the start. Ok for trunk? Johann gcc/ PR target/78883 * config/avr/avr.c (rtl-iter.h): Include it. (TARGET_LEGITIMATE_COMBINED_INSN): New hook define... (avr_legitimate_combined_insn): ...and i

Re: [patch] update zlib to the 1.2.10 release.

2017-01-13 Thread Matthias Klose
On 12.01.2017 22:39, Jeff Law wrote: > On 01/12/2017 02:26 PM, Matthias Klose wrote: >> On 12.01.2017 22:17, Jeff Law wrote: >>> On 01/05/2017 07:45 AM, Matthias Klose wrote: These are the changes updating zlib from 1.2.8 to 1.2.10. It is only used when building without a system zli

Re: [PATCH] Reload global options when strict aliasing is dropped (PR ipa/79043).

2017-01-13 Thread Richard Biener
On Tue, Jan 10, 2017 at 4:28 PM, Martin Liška wrote: > As mentioned in the PR, we currently do not properly reload global > optimization options when we drop strict-aliasing flag on a function > that equals to cfun. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > >

[PATCH] PR78361 recognise noexcept functions as referenceable

2017-01-13 Thread Jonathan Wakely
This ensures that __is_referenceable gives the right answer for functions with noexcept in the type, which exist in C++17. I'll also review the stuff in for similar problems. Tested powerpc64le-linux, -std=gnu++{14,17}, committed to trunk. commit 7029af834c490402beaab6336a1d11d286f65cc8 Autho

[PATCH v5] add -fprolog-pad=N,M option

2017-01-13 Thread Torsten Duwe
Changes since v4: hopefully addressed all of Sandra's requests and suggestions concerning the documentation snippets, thanks for the feedback. If it still isn't clear, feel free to rephrase -- I'm a programmer, not a technical writer. 2017-01-13 Torsten Duwe : * c-family/c-att

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

2017-01-13 Thread Renlin Li
Hi Christophe, On 13/01/17 11:14, Christophe Lyon wrote: On 13 January 2017 at 11:22, Renlin Li wrote: Hi Christophe, Thanks for testing the patch! I check the test case gcc.dg/lto/pr54709, it seems the test case is not properly written. It add extra ld option -shared without checking the ta

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

2017-01-13 Thread Christophe Lyon
On 13 January 2017 at 13:26, Renlin Li wrote: > Hi Christophe, > > > On 13/01/17 11:14, Christophe Lyon wrote: >> >> On 13 January 2017 at 11:22, Renlin Li wrote: >>> >>> Hi Christophe, >>> >>> Thanks for testing the patch! >>> I check the test case gcc.dg/lto/pr54709, it seems the test case is n

Re: [PATCH][GIMPLE FE] Add parsing of MEM_REFs

2017-01-13 Thread Richard Biener
On Fri, 13 Jan 2017, Richard Biener wrote: > On Fri, 13 Jan 2017, Jakub Jelinek wrote: > > > On Fri, Jan 13, 2017 at 09:15:22AM +0100, Richard Biener wrote: > > > > @@ -1710,6 +1716,24 @@ dump_generic_node (pretty_printer *pp, t > > > > print_hex (val, pp_buffer (pp)->digit_buffer); > >

[driver, doc] Support escaping special characters in specs

2017-01-13 Thread Rainer Orth
As a prerequisite for (a corner case in) fixing PR target/40411, we need the ability to escape special characters in specs. Case at hand: we want to match -std=iso9899:199409 which doesn't work right now. The option isn't an alias but the canonical form (though in theory one could introduce -std=

Re: [PATCH] Reload global options when strict aliasing is dropped (PR ipa/79043).

2017-01-13 Thread Martin Liška
On 01/13/2017 01:16 PM, Richard Biener wrote: > On Tue, Jan 10, 2017 at 4:28 PM, Martin Liška wrote: >> As mentioned in the PR, we currently do not properly reload global >> optimization options when we drop strict-aliasing flag on a function >> that equals to cfun. >> >> Patch can bootstrap on pp

Re: [PATCH] builtin expansion of strncmp for rs6000

2017-01-13 Thread Joseph Myers
On Fri, 13 Jan 2017, Tulio Magno Quites Machado Filho wrote: > > Tulio will look at fixing it in glibc tomorrow. Thanks for the report, > > Does this code affects a specific rs6000 build? i.e. powerpc64le -mcpu=power8. > Or is it generic? build-many-glibcs.py does not use any special configure

[PATCH] Mark test as XFAIL for C++17 mode

2017-01-13 Thread Jonathan Wakely
This test fails to compile in C++17 mode because the explicit instantiation using a custom allocator runs into the fact that the new node extraction/reinsertion functions for C++17 don't support fancy pointers (yet). Adding dg-xfail-if avoids the FAIL in C++17 mode, and changing it from a run tes

Re: [PATCH] Reload global options when strict aliasing is dropped (PR ipa/79043).

2017-01-13 Thread Richard Biener
On Fri, Jan 13, 2017 at 2:00 PM, Martin Liška wrote: > On 01/13/2017 01:16 PM, Richard Biener wrote: >> On Tue, Jan 10, 2017 at 4:28 PM, Martin Liška wrote: >>> As mentioned in the PR, we currently do not properly reload global >>> optimization options when we drop strict-aliasing flag on a funct

Re: Unreviewed fixincludes patch

2017-01-13 Thread Rainer Orth
Hi Bruce, > *I* would certainly argue that. I do occasionally shut down the > internet and go on vacation :). Looks good to me, not being a Solaris good habit: should get into it myself ;-) > person anymore. Thanks. > BTW, tiny notational/formatting thing: the '<<-' "here text" marker says

[patch,avr]: Increase branch costs after reload.

2017-01-13 Thread Georg-Johann Lay
This adds a penalty of 4 to the post-reload branch costs. Purpose is reduce the number of out-of-line blocks like in unsigned long variant5 (unsigned in) { unsigned long out = 0; if (in & (1 << 0)) out |= 0xful << (4*0); if (in & (1 << 1)) out |= 0xful << (4*1); if (in & (1 << 2)

Re: [C++ PATCH] c++/61636 generic lambdas and this capture

2017-01-13 Thread Nathan Sidwell
On 12/21/2016 03:27 PM, Nathan Sidwell wrote: This patch addresses bug 61636, which is an ICE during generic lambda instantiation due to unexpected this capture. Here's an updated patch. Firstly I added the worker function to lambda.c, with a more descriptive name. Secondly, this implements a

Re: [PATCH, ARM] correctly encode the CC reg data flow

2017-01-13 Thread Richard Earnshaw (lists)
On 18/12/16 12:58, Bernd Edlinger wrote: > Hi, > > this is related to PR77308, the follow-up patch will depend on this one. > > When trying the split the *arm_cmpdi_insn and *arm_cmpdi_unsigned > before reload, a mis-compilation in libgcc function __gnu_satfractdasq > was discovered, see [1] for

Re: [Ping~]Re: [5/5][AArch64, libgcc] Runtime support for AArch64 return address signing (also attached target macros version)

2017-01-13 Thread James Greenhalgh
On Thu, Jan 12, 2017 at 06:10:36PM +, Jiong Wang wrote: > On 06/01/17 11:47, Jiong Wang wrote: > >This is the update on libgcc unwinder support according to new > >DWARF proposal. > > > >As Joseph commented, duplication of unwind-dw2.c is not encouraged > >in libgcc, > >But from this patch, you

[v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Ville Voutilainen
Update patch with splices for __carry added. Hopefully this resolves the remaining concerns that we had. diff --git a/libstdc++-v3/include/bits/list.tcc b/libstdc++-v3/include/bits/list.tcc index c4f397f..9ba403c 100644 --- a/libstdc++-v3/include/bits/list.tcc +++ b/libstdc++-v3/include/bits/list.

Re: [v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Jonathan Wakely
On 13/01/17 16:26 +0200, Ville Voutilainen wrote: Update patch with splices for __carry added. Hopefully this resolves the remaining concerns that we had. OK for trunk after fixing the ADL issue noted below. There are also two stylistic comments ... diff --git a/libstdc++-v3/include/bits/lis

[PATCH 2/2] [msp430] Remove mpy.o from libgcc

2017-01-13 Thread Joe Seymour
This patch fixes "multiple definition of `__mspabi_mpyi'" errors encountered with -mhwmult=f5series, by moving mpy.o out of libgcc and into libmul_none.a. The other libmul_*.a archives already provide a definition of _mspabi_mpyi. mpy.c actually contains __mulhi3, but the msp430 backend renames th

Re: [C++ Patch] PR 71737

2017-01-13 Thread Nathan Sidwell
On 01/13/2017 09:45 AM, Paolo Carlini wrote: Hi, in this error recovery issue get_underlying_template crashes when TYPE_TEMPLATE_INFO_MAYBE_ALIAS is applied to a null orig_type. Simply checking for that condition appears to solve the issue in a straightforward way. Tested x86_64-linux. Wouldn'

Re: [v3 PATCH] PR libstdc++/78389

2017-01-13 Thread Jonathan Wakely
On 13/01/17 14:41 +, Jonathan Wakely wrote: On 13/01/17 16:26 +0200, Ville Voutilainen wrote: Update patch with splices for __carry added. Hopefully this resolves the remaining concerns that we had. OK for trunk after fixing the ADL issue noted below. As discussed on IRC, the list::merge

[C++ Patch] PR 71737

2017-01-13 Thread Paolo Carlini
Hi, in this error recovery issue get_underlying_template crashes when TYPE_TEMPLATE_INFO_MAYBE_ALIAS is applied to a null orig_type. Simply checking for that condition appears to solve the issue in a straightforward way. Tested x86_64-linux. Thanks, Paolo. / /cp 2017-01

[PATCH 1/2] [msp430] Remove source files from libmul archives

2017-01-13 Thread Joe Seymour
The msp430 libmul archives currently contain several source files. If you run msp430-elf-nm on these archives it will produce output on stderr: > msp430-elf-nm: enable-execute-stack.c: File format not recognized ... > msp430-elf-nm: libgcc_tm.h: File format not recognized It looks like the source

[PATCH] Fix wrong assumption in contains_type_p (PR ipa/71207).

2017-01-13 Thread Martin Liška
Hello. As mentioned in the PR, having a diamond virtual inheritance can cause a wrong assumption done in contains_type_p. I also decided to rename one argument of the function as otr_type and outer_type names are very confusing. Apart from what was written in bugzilla I also verified that after t

[PATCH] Define cxx11-abi effective target for libstdc++ tests

2017-01-13 Thread Jonathan Wakely
This effective target means we can skip/xfail tests that depend on the new std::string, std::list etc. I've added the check_effective_target_cxx11 procedure in libstdc++.exp not in gcc/testsuite/lib/target-supports.exp because I don't think it is useful outside the libstdc++ testsuite. There are

[PATCH] Do not declare artificial variables in tree-profile.c to have a definition (PR lto/69188).

2017-01-13 Thread Martin Liška
Hello. Nice example provided in the PR causes ICE as we have an artificial symbol created in tree-profile.c once being removed by remove unreachable nodes (-O0) and once not (-O1). Well, difference is in process_references where following hunk prevent removal: || (((before_inlining

Add test for c++/71166

2017-01-13 Thread Marek Polacek
This bug was fixed in r238395, so what remains to do for GCC 7 is to add a testcase and close the PR. Tested on x86_64-linux, ok for trunk? 2017-01-13 Marek Polacek PR c++/71166 * g++.dg/cpp0x/constexpr-array18.C: New test. diff --git gcc/testsuite/g++.dg/cpp0x/constexpr-arra

Re: [PATCH] BRIG frontend: request for a global review

2017-01-13 Thread Pekka Jääskeläinen
Hi Richard, Thanks for the review! Replies/questions inline. On Fri, Jan 13, 2017 at 2:28 PM, Richard Biener wrote: > On Thu, Jan 12, 2017 at 3:55 PM, Pekka Jääskeläinen > wrote: >> Hi, >> >> A gentle ping... > > diff --git a/gcc/configure.ac b/gcc/configure.ac > index 140b9f9..06941c5 100644

Re: [PATCH TEST]Add test for PR78652

2017-01-13 Thread Bin.Cheng
On Mon, Dec 12, 2016 at 4:35 PM, Jakub Jelinek wrote: > On Mon, Dec 12, 2016 at 09:32:30AM -0700, Jeff Law wrote: >> On 12/09/2016 03:20 AM, Bin Cheng wrote: >> >Hi, >> >PR78652 was fixed by patch for PR77856, this patch adds a test for it. >> >Test result checked, is it OK? >> > >> >Thanks, >>

[PATCH] Add string_view support to COW std::string

2017-01-13 Thread Jonathan Wakely
This adds the C++17 changes to make std::string_view interoperate with std::string. The code is mostly just copied from the new std::string, with two adjustments needed where the names of internal member functions differ. With this we have no more test failures when using the old ABI (either via

Re: [PATCH] BRIG frontend: request for a global review

2017-01-13 Thread Pekka Jääskeläinen
On Fri, Jan 13, 2017 at 2:34 PM, Richard Biener wrote: > On Thu, Jan 12, 2017 at 3:55 PM, Pekka Jääskeläinen > wrote: >> Hi, >> >> A gentle ping... > > Looking at 002/ > > What's the reason of having brig-builtins.def? I do not see any > middle-end stuff using them > and if you just emit calls

Re: Avoid PR72749 by not using unspecs

2017-01-13 Thread Uros Bizjak
On Fri, Jan 13, 2017 at 12:50 PM, Alan Modra wrote: > Rather than using unspecs in doloop insns to stop combine creating > these insns, use legitimate_combined_insn. > > I'm not sure why the original patch implementing > legitimate_combined_insn did not store the result of recog to the insn > but

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-13 Thread James Greenhalgh
On Fri, Jan 06, 2017 at 11:47:07AM +, Jiong Wang wrote: > On 11/11/16 18:22, Jiong Wang wrote: > gcc/ > 2017-01-06 Jiong Wang > > * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum. > * config/aarch64/aarch64-protos.h > (aarch64_return_address_signing_

Re: [2/5][AArch64] Generate dwarf information for -msign-return-address

2017-01-13 Thread Richard Earnshaw (lists)
On 06/01/17 11:47, Jiong Wang wrote: > On 11/11/16 18:22, Jiong Wang wrote: >> This patch generate DWARF description for pointer authentication. >> DWARF value >> expression is used to describe the authentication action. >> >> Please see the cover letter and AArch64 DWARF specification for the >>

Re: [PATCH, ARM] correctly encode the CC reg data flow

2017-01-13 Thread Bernd Edlinger
On 01/13/17 14:50, Richard Earnshaw (lists) wrote: > On 18/12/16 12:58, Bernd Edlinger wrote: >> Hi, >> >> this is related to PR77308, the follow-up patch will depend on this one. >> >> When trying the split the *arm_cmpdi_insn and *arm_cmpdi_unsigned >> before reload, a mis-compilation in libgcc f

Re: [3/5][AArch64] New builtins required by libgcc unwinder

2017-01-13 Thread Richard Earnshaw (lists)
On 06/01/17 11:47, Jiong Wang wrote: > On 11/11/16 18:22, Jiong Wang wrote: >> This patch implements a few ARMv8.3-A new builtins for pointer sign and >> authentication instructions. >> >> Currently, these builtins are supposed to be used by libgcc EH unwinder >> only. They are not public interfac

[PATCH, rs6000] Fix swap optimization to handle __builtin_vsx_xxspltd

2017-01-13 Thread Bill Schmidt
Hi, There is a gap in swap optimization that does not properly handle code generated by __builtin_vsx_xxspltd. This is expanded into an UNSPEC_VSX_XXSPLTD, which is currently treated as ok to swap. It should instead be treated as ok to swap, with special handling to modify the lane used as the

Re: [PATCH][AArch64][GCC 6] PR target/79041: Correct -mpc-relative-literal-loads logic in aarch64_classify_symbol

2017-01-13 Thread James Greenhalgh
On Wed, Jan 11, 2017 at 04:32:45PM +, Kyrill Tkachov wrote: > Hi all, > > In this PR we generated ADRP/ADD instructions with :lo12: relocations on > symbols even though -mpc-relative-literal-loads is used. This is due to the > confusing double-negative logic of the nopcrelative_literal_loads a

Re: [C++ Patch] PR 71737

2017-01-13 Thread Paolo Carlini
Hi, On 13/01/2017 15:51, Nathan Sidwell wrote: On 01/13/2017 09:45 AM, Paolo Carlini wrote: Hi, in this error recovery issue get_underlying_template crashes when TYPE_TEMPLATE_INFO_MAYBE_ALIAS is applied to a null orig_type. Simply checking for that condition appears to solve the issue in a st

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-13 Thread Jiong Wang
On 13/01/17 16:04, James Greenhalgh wrote: On Fri, Jan 06, 2017 at 11:47:07AM +, Jiong Wang wrote: On 11/11/16 18:22, Jiong Wang wrote: gcc/ 2017-01-06 Jiong Wang * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum. * config/aarch64/aarch64-protos.h

Re: Add test for c++/71166

2017-01-13 Thread Jeff Law
On 01/13/2017 08:40 AM, Marek Polacek wrote: This bug was fixed in r238395, so what remains to do for GCC 7 is to add a testcase and close the PR. Tested on x86_64-linux, ok for trunk? 2017-01-13 Marek Polacek PR c++/71166 * g++.dg/cpp0x/constexpr-array18.C: New test. OK. j

Re: [PATCH] PR 78534 Change character length from int to size_t

2017-01-13 Thread Janne Blomqvist
On Thu, Jan 12, 2017 at 10:46 AM, FX wrote: >> I was finally able to get a 32-bit i686 compiler going (my attempts to >> do this on a x86_64-pc-linux-gnu host failed, in the end I resorted to >> running 32-bit builds/tests on a i686 container). At least on i686, >> the patch below on top of the bi

Re: Avoid PR72749 by not using unspecs

2017-01-13 Thread Jeff Law
On 01/13/2017 04:50 AM, Alan Modra wrote: Rather than using unspecs in doloop insns to stop combine creating these insns, use legitimate_combined_insn. I'm not sure why the original patch implementing legitimate_combined_insn did not store the result of recog to the insn but it seems good to me,

[PATCH] Remove unused include from Profile Mode header

2017-01-13 Thread Jonathan Wakely
This profile mode header includes , which includes and in C++17 mode, and they try to include the profile mode headers, and we end up in a cycle and so the content of the headers is skipped by the header guards. It doesn't look like profile mode needs anyway, so we can just remove it. In stage

Re: [PATCH] Do not declare artificial variables in tree-profile.c to have a definition (PR lto/69188).

2017-01-13 Thread Jeff Law
On 01/13/2017 08:08 AM, Martin Liška wrote: Hello. Nice example provided in the PR causes ICE as we have an artificial symbol created in tree-profile.c once being removed by remove unreachable nodes (-O0) and once not (-O1). Well, difference is in process_references where following hunk prevent

Re: [PATCH 4/6] RISC-V Port: libsanitizer

2017-01-13 Thread Bernhard Reutner-Fischer
On 12 January 2017 03:30:36 CET, Palmer Dabbelt wrote: >--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc >+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc >@@ -64,7 +64,7 @@ namespace __sanitizer { > >#if !defined(__powerpc64__) && !defined(__x86_64__)

Re: [PATCH/AARCH64] Add scheduler for Thunderx2t99

2017-01-13 Thread James Greenhalgh
On Thu, Jan 12, 2017 at 03:43:52AM +, Hurugalawadi, Naveen wrote: > Hi James, > > The scheduling patch for vulcan was posted at the following link:- > https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01205.html > > We are working on the patch and addressed the comments for thunderx2t99. Great,

Re: [C++ Patch] PR 71737

2017-01-13 Thread Jason Merrill
On Fri, Jan 13, 2017 at 11:42 AM, Paolo Carlini wrote: > Hi, > > On 13/01/2017 15:51, Nathan Sidwell wrote: >> >> On 01/13/2017 09:45 AM, Paolo Carlini wrote: >>> >>> Hi, >>> >>> in this error recovery issue get_underlying_template crashes when >>> TYPE_TEMPLATE_INFO_MAYBE_ALIAS is applied to a nu

[PATCH] PR65411 don't retry fclose on EINTR

2017-01-13 Thread Jonathan Wakely
After an interrupted fclose() we can't know if it's safe (or undefined behaviour) to re-use the FILE*, so we shouldn't try calling fclose again. PR libstdc++/65411 * config/io/basic_file_stdio.cc (__basic_file::close()): Don't retry fclose on EINTR. Tested x86_64-linux, c

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

2017-01-13 Thread James Greenhalgh
On Fri, Sep 02, 2016 at 11:31:04AM +, Wilco Dijkstra wrote: > Ramana Radhakrishnan wrote: > > Can you please file a PR for this and add some testcases ?  This sounds > > like a serious enough problem that needs to be looked at probably going > > back since the dawn of time. > > I've created

Re: [2/5][AArch64] Generate dwarf information for -msign-return-address

2017-01-13 Thread Jiong Wang
On 13/01/17 16:09, Richard Earnshaw (lists) wrote: On 06/01/17 11:47, Jiong Wang wrote: This patch is an update on DWARF generation for return address signing. According to new proposal, we simply needs to generate REG_CFA_WINDOW_SAVE annotation. gcc/ 2017-01-06 Jiong Wang * con

Re: [driver, doc] Support escaping special characters in specs

2017-01-13 Thread Joseph Myers
On Fri, 13 Jan 2017, Rainer Orth wrote: > I'm unsure if the patch is large enough to need a copyright assignment > (in which case it's almost certainly too late for GCC 7), and even if > not if it's appropriate at this point in the release cycle. I think it's big enough to need an assignment. No

[PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-13 Thread Jakub Jelinek
Hi! This is something that has been discussed already during the last Cauldron. Especially for distributions it is undesirable to need to have proprietary CUDA libraries and headers installed when building GCC. These two patches allow building GCC without CUDA around in a way that later on can of

Re: [driver, doc] Support escaping special characters in specs

2017-01-13 Thread Rainer Orth
Hi Joseph, > On Fri, 13 Jan 2017, Rainer Orth wrote: > >> I'm unsure if the patch is large enough to need a copyright assignment >> (in which case it's almost certainly too late for GCC 7), and even if >> not if it's appropriate at this point in the release cycle. > > I think it's big enough to ne

Re: [driver, doc] Support escaping special characters in specs

2017-01-13 Thread Joseph Myers
On Fri, 13 Jan 2017, Rainer Orth wrote: > ok, then I'll get the ball rolling. Are the forms on > > https://www.gnu.org/software/gnulib/Copyright/ > > current? I didn't have to deal with the copyright assignment process so > far. As far as I know they are (the place I refer people to is

Re: [PATCH, GCC/testsuite/ARM, ping] Skip optional_mthumb tests if GCC has a default mode

2017-01-13 Thread Thomas Preudhomme
Ping ARM maintainers? (target independent part ACKed by Jeff) Best regards, Thomas On 03/01/17 17:19, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 12/12/16 17:52, Thomas Preudhomme wrote: Hi, The logic to make -mthumb optional for Thumb-only devices is only executed when no -mar

Re: [PATCH, GCC/LRA, gcc-5/6-branch] Fix PR78617: Fix conflict detection in rematerialization

2017-01-13 Thread Thomas Preudhomme
Ping? I'm not sure if an ok from Valdimir is enough or if I also need RM approval. Best regards, Thomas On 09/01/17 09:51, Thomas Preudhomme wrote: Hi, Is it ok to backport the fix for PR78617 (incorrect conflict detection in rematerialization) to GCC 5 and GCC 6? The patch applies cleanly a

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-13 Thread Joseph Myers
On Fri, 13 Jan 2017, Jakub Jelinek wrote: > --- libgomp/plugin/cuda/cuda.h.jj 2017-01-13 15:58:00.966544147 +0100 > +++ libgomp/plugin/cuda/cuda.h2017-01-13 17:02:47.355817896 +0100 > @@ -0,0 +1,174 @@ > +/* CUDA API description. > + Copyright (C) 2017 Free Software Foundation, Inc.

Re: [PATCH, rs6000] Add vec_nabs builtin support

2017-01-13 Thread Carl E. Love
Segar: The issues you pointed out below have been addressed in the following updated patch. Please let me know if the changes are acceptable. Thanks for your help and feedback. Carl Love > rs6000-c.c > > > vector signed char vec_nabs (vector signed char) > > vecto

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-13 Thread Jakub Jelinek
On Fri, Jan 13, 2017 at 06:19:02PM +, Joseph Myers wrote: > > --- libgomp/plugin/cuda/cuda.h.jj 2017-01-13 15:58:00.966544147 +0100 > > +++ libgomp/plugin/cuda/cuda.h 2017-01-13 17:02:47.355817896 +0100 > > @@ -0,0 +1,174 @@ > > +/* CUDA API description. > > + Copyright (C) 2017 Free S

Re: [PATCH, ARM] correctly encode the CC reg data flow

2017-01-13 Thread Bernd Edlinger
On 01/13/17 17:10, Bernd Edlinger wrote: > On 01/13/17 14:50, Richard Earnshaw (lists) wrote: >> On 18/12/16 12:58, Bernd Edlinger wrote: >>> Hi, >>> >>> this is related to PR77308, the follow-up patch will depend on this one. >>> >>> When trying the split the *arm_cmpdi_insn and *arm_cmpdi_unsigne

Re: [PR tree-optimization/71691] Fix unswitching in presence of maybe-undef SSA_NAMEs (take 2)

2017-01-13 Thread Aldy Hernandez
[Sorry for the delay, I was sick.] On 01/09/2017 04:30 AM, Richard Biener wrote: On Sat, Jan 7, 2017 at 1:54 PM, Aldy Hernandez wrote: On 01/04/2017 07:11 AM, Richard Biener wrote: On Tue, Jan 3, 2017 at 6:36 PM, Aldy Hernandez wrote: On 12/20/2016 09:16 AM, Richard Biener wrote: On Fr

Re: [PATCH] adding missing LTO to some warning options (PR 78606)

2017-01-13 Thread Andreas Schwab
On Jan 10 2017, Martin Sebor wrote: > Index: gcc/testsuite/gcc.dg/pr78768.c > === > --- gcc/testsuite/gcc.dg/pr78768.c(revision 0) > +++ gcc/testsuite/gcc.dg/pr78768.c(working copy) > @@ -0,0 +1,13 @@ > +/* PR c/78768 - -Wall

  1   2   >