Re: [PATCH] Fix tree-inline.c INDIRECT_REF handling (PR c++/84767)

2018-03-09 Thread Jeff Law
On 03/09/2018 11:06 AM, Jakub Jelinek wrote: > Hi! > > On the following testcase we ICE because when cloning the ctor using > tree-inline.c infrastructure we don't remap the type of INDIRECT_REF, > which needs to be remapped if it a variable length type, otherwise we > refer to the parameters of

Re: [PATCH, rs6000] Fix PR83969: ICE in final_scan_insn, at final.c:2997

2018-03-09 Thread Segher Boessenkool
On Wed, Mar 07, 2018 at 06:50:41PM -0600, Peter Bergner wrote: > PR83969 shows another bug in mem_operand_gpr() (which implements the "Y" > constraint) accepting reg+reg addresses.  This was fixed by adding a call > to rs6000_offsettable_memref_p() to verify the address is a valid offsettable >

Re: [RFA][PATCH][PR middle-end/61118] Improve tree CFG accuracy for setjmp/longjmp

2018-03-09 Thread Jeff Law
On 03/07/2018 05:04 PM, Peter Bergner wrote: > On 3/7/18 12:01 AM, Jeff Law wrote: >> I believe so by nature that the setjmp dominates the longjmp sites and >> thus also dominates the dispatcher. But it's something I want to >> explicitly check before resubmitting. > > Are we sure a setjmp has

C++ PATCH for c++/84726, unnecessary lambda capture of constant var

2018-03-09 Thread Jason Merrill
wg21.link/p0588 changes i from not captured to captured by the lambda in the testcase, but an implementation is allowed to optimize away that capture if it doesn't affect the semantics of the program. Since we didn't capture it in previous versions of GCC, the optimization is very desirable to

Re: [PR84682] disregard address constraints on non-addresses

2018-03-09 Thread Jeff Law
On 03/08/2018 11:45 PM, Alexandre Oliva wrote: > LRA gets very confused when non-addresses are passed as operands to > asms with address contraints. Even if other constraints are > available, and the operand is a perfect fit for them, we'd still > attempt to process the operand as an address, and

Re: [RFA][PATCH][PR middle-end/61118] Improve tree CFG accuracy for setjmp/longjmp

2018-03-09 Thread Jeff Law
On 03/08/2018 06:22 AM, Richard Biener wrote: > On Thu, Mar 8, 2018 at 1:54 PM, Michael Matz wrote: >> Hi, >> >> On Wed, 7 Mar 2018, Peter Bergner wrote: >> >>> On 3/7/18 12:01 AM, Jeff Law wrote: I believe so by nature that the setjmp dominates the longjmp sites and thus

Re: [C++ Patch] PR 71169 ("[7/8 Regression] ICE on invalid C++ code in pop_nested_class"), PR 71832 and more (Take 2)

2018-03-09 Thread Paolo Carlini
Hi, On 09/03/2018 17:11, Jason Merrill wrote: Hmm, actually I think any_erroneous_template_args will return false for error_mark_node. Just moving the error_mark_node check up should correct that. OK with that change. Ah, thanks for spotting that: it wasn't clear to me that TI_ARGS cannot be

Re: [PATCH, rs6000] Fix PR83969: ICE in final_scan_insn, at final.c:2997

2018-03-09 Thread Peter Bergner
On 3/9/18 1:31 PM, Segher Boessenkool wrote: > On Wed, Mar 07, 2018 at 06:50:41PM -0600, Peter Bergner wrote: >> This passed bootstrap and regtesting on powerpc64-linux, running the >> testsuite in both 32-bit and 64-bit modes with no regressions. >> Ok for trunk? > > Sorry this took a while to

Re: [PATCH] avoid warning for memcpy to self (PR 83456)

2018-03-09 Thread Jeff Law
On 03/08/2018 05:46 PM, Martin Sebor wrote: > On 03/08/2018 01:59 AM, Richard Biener wrote: >> On Thu, Mar 8, 2018 at 12:01 AM, Martin Sebor  wrote: >>> I have become convinced that issuing -Wrestrict in gimple-fold >>> for calls to memcpy() where the source pointer is the same 

Re: [RFA][PATCH][PR middle-end/61118] Improve tree CFG accuracy for setjmp/longjmp

2018-03-09 Thread Richard Biener
On March 9, 2018 8:42:16 PM GMT+01:00, Jeff Law wrote: >On 03/08/2018 06:22 AM, Richard Biener wrote: >> On Thu, Mar 8, 2018 at 1:54 PM, Michael Matz wrote: >>> Hi, >>> >>> On Wed, 7 Mar 2018, Peter Bergner wrote: >>> On 3/7/18 12:01 AM, Jeff Law wrote: >

Re: [PATCH] fix ICE in generic_overlap (PR 84526)

2018-03-09 Thread Jeff Law
On 03/07/2018 03:52 PM, Martin Sebor wrote: > On 03/07/2018 12:37 PM, Jeff Law wrote: >> On 02/26/2018 10:32 AM, Martin Sebor wrote: >>> >>> PR tree-optimization/84526 - ICE in generic_overlap at  >>> gcc/gimple-ssa-warn-restrict.c:927 since r257860 >>> >>> >>> gcc/ChangeLog: >>> >>> PR 

libgo patch committed: Add internal/trace to noinst_DATA

2018-03-09 Thread Ian Lance Taylor
This libgo patch adds internal/trace to noinst_DATA. The internal/trace package is only imported by tests (specifically the tests in runtime/trace) so it must be in noinst_DATA to ensure that it is built before running the tests. This was mostly working because internal/trace has tests itself,

[PATCH] Fix tree-inline.c INDIRECT_REF handling (PR c++/84767)

2018-03-09 Thread Jakub Jelinek
Hi! On the following testcase we ICE because when cloning the ctor using tree-inline.c infrastructure we don't remap the type of INDIRECT_REF, which needs to be remapped if it a variable length type, otherwise we refer to the parameters of the original ctor rather than of the base or complete

[PATCH] Fix scoped enum debug info (PR debug/58150)

2018-03-09 Thread Jakub Jelinek
Hi! As the following testcase shows, we emit bad debug info if a scoped enum is used before the enumerators are defined. gen_enumeration_type_die has support for enum forward declarations that have NULL TYPE_SIZE (i.e. incomplete), but in this case it is complete, just is ENUM_IS_OPAQUE and the

[committed] Fix va_arg gimplification on powerpc{,spe} (PR target/84772)

2018-03-09 Thread Jakub Jelinek
Hi! The following is a powerpcspe variant of the sparc PR39645, and rs6000 has the same code (not sure if ever used or dead after powerpcspe removal). When gimplifying the builtin, because va_arg_tmp.N is not marked as addressable from the beginning, we call prepare_gimple_addressable which

C++ PATCH for c++/84752, ICE with capture of constexpr array

2018-03-09 Thread Jason Merrill
Another case where we need to set a flag on the ck_identity conversion so that we don't mistakenly pull out the constant value of something that we want the address of. Tested x86_64-pc-linux-gnu, applying to trunk. commit 493898f505c4b38145356ef3b51dd986312497a8 Author: Jason Merrill

C++ PATCH for c++/84785, ICE with alias template and default targs

2018-03-09 Thread Jason Merrill
If we are missing some earlier template arguments, we need to be prepared for template parameters to remain in the result of substitution. In such a situation we need to make sure processing_template_decl is set so things don't get confused by those template parameters. Tested

[PATCH] PR fortran/84734 -- Fix ICE on invalid code

2018-03-09 Thread Steve Kargl
In fixing PR fortran/83633, it seems the patch I committed introduced an ICE for nonsensical invalid Fortran. The attached patch cures the ICE and now (re)issues an error message. The basic problem seems to boil down to the recursive calling of gfc_simplify_expr reduces "huge(1_8)+1_8" to

Re: [PATCH] PR fortran/84734 -- Fix ICE on invalid code

2018-03-09 Thread Steve Kargl
On Fri, Mar 09, 2018 at 09:13:10PM -0800, Steve Kargl wrote: > In fixing PR fortran/83633, it seems the patch I committed > introduced an ICE for nonsensical invalid Fortran. The > attached patch cures the ICE and now (re)issues an error > message. > > The basic problem seems to boil down to

C++ PATCH for c++/84770, ICE with parameter pack and typedef

2018-03-09 Thread Jason Merrill
Now that argument packs don't have a type, the check for a non-type argument with a typedefy type wasn't working for them. So let's recurse. Tested x86_64-pc-linux-gnu, applying to trunk. commit 7a163ab3c89382ad5c3bda2f345950760bc499c7 Author: Jason Merrill Date: Fri Mar 9

Re: [PR84620] output symbolic entry_view as data2, not addr

2018-03-09 Thread Alexandre Oliva
On Mar 9, 2018, Jakub Jelinek wrote: > Also, I'd say there should be > symview_upper_bound = 0; > in dwarf2out_c_finalize for better behavior of GCC JIT. Thanks. I added code to clear zero_view_p too. Here's what I'm checking in. [IEPM] [PR debug/84620] use constant

[PR c++/84733] ICE in check-local-shadow

2018-03-09 Thread Nathan Sidwell
This patch fixes the ICE in check-local-shadow, but reverts behaviour to the earlier ICE in pop_local_binding. Check local shadow had a check when finding an outer local scope for function_parm_scope. But that code didn't make sense and was unreachable with the current testsuite. So I

Re: Patch ping (Re: [PATCH PR82965/PR83991]Fix invalid profile count in vectorization peeling)

2018-03-09 Thread Paul Hua
It's looks fixed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82965#c12 on mips64el. Thanks. On Mon, Feb 26, 2018 at 8:02 PM, Bin.Cheng wrote: > Ping^2 > > Thanks, > bin > > On Mon, Feb 19, 2018 at 5:14 PM, Jakub Jelinek wrote: >> Hi! >> >> Honza, do

Re: [SFN+LVU+IEPM v4 9/9] [IEPM] Introduce inline entry point markers

2018-03-09 Thread Jakub Jelinek
On Fri, Mar 09, 2018 at 09:48:45AM +, Bin.Cheng wrote: > On Wed, Feb 28, 2018 at 6:17 AM, Alexandre Oliva wrote: > > On Feb 21, 2018, Alexandre Oliva wrote: > > > >> On Feb 15, 2018, Szabolcs Nagy wrote: > >>> i see assembler slow

Fix PR target/84763

2018-03-09 Thread Eric Botcazou
target/84763 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation when the function accesses prior frames. 2018-03-09 Eric Botcazou <ebotca...@adacore.com> * gcc.c-torture/compile/20180309-1.c: New test. -- Eric BotcazouIndex: config/

Re: [SFN+LVU+IEPM v4 9/9] [IEPM] Introduce inline entry point markers

2018-03-09 Thread Ramana Radhakrishnan
On Fri, Mar 9, 2018 at 9:48 AM, Bin.Cheng wrote: > On Wed, Feb 28, 2018 at 6:17 AM, Alexandre Oliva wrote: >> On Feb 21, 2018, Alexandre Oliva wrote: >> >>> On Feb 15, 2018, Szabolcs Nagy wrote: i see

Re: [PR84620] output symbolic entry_view as data2, not addr

2018-03-09 Thread Alexandre Oliva
On Mar 8, 2018, Jakub Jelinek wrote: > An upper bound would be fine, count any potential spot where you introduce a > view and if the upper bound fits into 8-bit value, use data1, if into 16-bit > value, use data2, otherwise use data4. [IEPM] [PR debug/84620] use constant

Re: [C++ Patch] PR 71169 ("[7/8 Regression] ICE on invalid C++ code in pop_nested_class"), PR 71832 and more (Take 2)

2018-03-09 Thread Paolo Carlini
.. after a few hours of sleep, I realize that in principle we could also call any_erroneous_template_args_p directly. In that case however, I believe get_template_info does nothing 100% of the case, not sure we want to do that. Paolo.

Re: [SFN+LVU+IEPM v4 9/9] [IEPM] Introduce inline entry point markers

2018-03-09 Thread Bin.Cheng
On Wed, Feb 28, 2018 at 6:17 AM, Alexandre Oliva wrote: > On Feb 21, 2018, Alexandre Oliva wrote: > >> On Feb 15, 2018, Szabolcs Nagy wrote: >>> i see assembler slow downs with these location view patches >>> i opened

Re: [PR84620] output symbolic entry_view as data2, not addr

2018-03-09 Thread Jakub Jelinek
On Fri, Mar 09, 2018 at 05:49:34AM -0300, Alexandre Oliva wrote: > @@ -27699,6 +27780,9 @@ dwarf2out_source_line (unsigned int line, unsigned > int column, > { > if (!RESETTING_VIEW_P (table->view)) > { > + table->symviews_since_reset++; > + if

Re: [og7] Update nvptx_fork/join barrier placement

2018-03-09 Thread Cesar Philippidis
On 03/09/2018 08:21 AM, Tom de Vries wrote: > On 03/09/2018 12:31 AM, Cesar Philippidis wrote: >> Nvidia Volta GPUs now support warp-level synchronization. > > Well, let's try to make that statement a bit more precise. > > All Nvidia architectures have supported synchronization of threads in a >

[PATCH] Fix PR84777

2018-03-09 Thread Richard Biener
With -Os we inhibit most loop header copying which in turn will disable any vectorization attempt either via -fopenmp or via -ftree-vectorize. The following makes sure the aggressive gate in should_duplicate_loop_header_p is not applied for force-vectorize loops. There's still

[PATCH] Fix PR84775

2018-03-09 Thread Richard Biener
The following reverts the fix for PR84178 again and instead prunes those bogus immediate uses from stmts we didn't yet insert. Micha has sth in the works to clean up the mess somewhat in GCC 9. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-03-09 Richard Biener

[C++ PATCH] Don't redefine __* builtins (PR c++/84724, take 2)

2018-03-09 Thread Jakub Jelinek
On Thu, Mar 08, 2018 at 04:06:24PM -0500, Jason Merrill wrote: > On Thu, Mar 8, 2018 at 1:01 PM, Jakub Jelinek wrote: > > The C FE just warns and doesn't override builtins, but C++ FE > > on say int __builtin_trap (); will override the builtin, so later > > builtin_decl_explicit

Seeking Release Manager approval for: [PATCH] jit: fix link on OS X and Solaris (PR jit/64089 and PR jit/84288)

2018-03-09 Thread David Malcolm
On Wed, 2018-02-14 at 23:36 +0100, FX wrote: > I can confirm that, with the attached revised patch, a bootstrap with > --enable-languages=c,c++,jit --enable-host-shared is successful on > macOS. > > FX Looks good to me; thanks for fixing. Release managers: I'd like to apply FX's patch here:

Re: Seeking Release Manager approval for: [PATCH] jit: fix link on OS X and Solaris (PR jit/64089 and PR jit/84288)

2018-03-09 Thread Jakub Jelinek
On Fri, Mar 09, 2018 at 09:14:13AM -0500, David Malcolm wrote: > On Wed, 2018-02-14 at 23:36 +0100, FX wrote: > > I can confirm that, with the attached revised patch, a bootstrap with > > --enable-languages=c,c++,jit --enable-host-shared is successful on > > macOS. > > > > FX > > Looks good to

Re: Patch ping (Re: [PATCH PR82965/PR83991]Fix invalid profile count in vectorization peeling)

2018-03-09 Thread Bin.Cheng
On Fri, Mar 9, 2018 at 10:25 AM, Paul Hua wrote: > It's looks fixed > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82965#c12 on mips64el. Hmm, is it fixed? or is it exposed now on mips64el? I read the latter from the comment. I think the issue is like explained, but

Re: [PR84682] disregard address constraints on non-addresses

2018-03-09 Thread Vladimir Makarov
On 03/09/2018 01:45 AM, Alexandre Oliva wrote: LRA gets very confused when non-addresses are passed as operands to asms with address contraints. Even if other constraints are available, and the operand is a perfect fit for them, we'd still attempt to process the operand as an address, and

Re: [og7] vector_length extension part 1: generalize function and variable names

2018-03-09 Thread Thomas Schwinge
Hi! On Thu, 1 Mar 2018 13:17:01 -0800, Cesar Philippidis wrote: > To reduce the size of the final patch, > I've separated all of the misc. function and variable renaming into this > patch. Yes, please always do such refactoring changes independently of other

Re: [og7] vector_length extension part 1: generalize function and variable names

2018-03-09 Thread Cesar Philippidis
On 03/09/2018 07:29 AM, Thomas Schwinge wrote: > On Thu, 1 Mar 2018 13:17:01 -0800, Cesar Philippidis > wrote: >> To reduce the size of the final patch, >> I've separated all of the misc. function and variable renaming into this >> patch. > > Yes, please always do such

[PATCH][arm] PR target/83193: Do not print arch/cpu hints twice on invalid -march/-mcpu

2018-03-09 Thread Kyrill Tkachov
Hi all, Currently when handling an invalid -march or -mcpu option on a toolchain without an explicit --with-mode configuration and compiling without an explicit -mthumb or -marm the arm specs end up calling arm_target_thumb_only to determine the "thumbness" of the target, which involves

Re: [PR84620] output symbolic entry_view as data2, not addr

2018-03-09 Thread Jason Merrill
On Fri, Mar 9, 2018 at 4:02 AM, Jakub Jelinek wrote: > On Fri, Mar 09, 2018 at 05:49:34AM -0300, Alexandre Oliva wrote: >> @@ -27699,6 +27780,9 @@ dwarf2out_source_line (unsigned int line, unsigned >> int column, >> { >> if (!RESETTING_VIEW_P (table->view)) >>

Re: Add "native" as a valid option value for -march= on arm (PR driver/83193).

2018-03-09 Thread Kyrill Tkachov
On 22/02/18 12:15, Martin Liška wrote: On 02/22/2018 11:59 AM, Kyrill Tkachov wrote: Hi Martin, On 22/02/18 08:51, Martin Liška wrote: On 02/21/2018 10:23 AM, Kyrill Tkachov wrote: On arm we also support "native" as a value for -mcpu and -mtune. These are both handled by the

Re: [C++ Patch] PR 71169 ("[7/8 Regression] ICE on invalid C++ code in pop_nested_class"), PR 71832 and more (Take 2)

2018-03-09 Thread Paolo Carlini
Hi, On 09/03/2018 16:17, Jason Merrill wrote: You should be able to say if (any_erroneous_template_args (type)) Indeed, that's what I tried to express earlier today, after a cappuccino ;) and I don't think you need the goto; the normal logic should handle the truncated vecs fine. It

Re: Add "native" as a valid option value for -march= on arm (PR driver/83193).

2018-03-09 Thread Martin Liška
On 03/09/2018 04:43 PM, Kyrill Tkachov wrote: On 22/02/18 12:15, Martin Liška wrote: On 02/22/2018 11:59 AM, Kyrill Tkachov wrote: Hi Martin, On 22/02/18 08:51, Martin Liška wrote: On 02/21/2018 10:23 AM, Kyrill Tkachov wrote: On arm we also support "native" as a value for -mcpu and

Re: [C++ Patch] PR 71169 ("[7/8 Regression] ICE on invalid C++ code in pop_nested_class"), PR 71832 and more (Take 2)

2018-03-09 Thread Jason Merrill
You should be able to say if (any_erroneous_template_args (type)) and I don't think you need the goto; the normal logic should handle the truncated vecs fine. On Fri, Mar 9, 2018 at 4:14 AM, Paolo Carlini wrote: > .. after a few hours of sleep, I realize that in

Re: [C++ PATCH] For -Wformat purposes use ellipsis args before class to pointer to class conversion (PR c++/84076)

2018-03-09 Thread Jakub Jelinek
On Fri, Mar 09, 2018 at 11:28:47AM -0500, Jason Merrill wrote: > On Thu, Mar 8, 2018 at 4:26 PM, Jakub Jelinek wrote: > > On Thu, Mar 08, 2018 at 04:20:40PM -0500, Jason Merrill wrote: > >> On Thu, Mar 8, 2018 at 1:08 PM, Jakub Jelinek wrote: > >> > The

Re: [PATCH] Fix PR84777

2018-03-09 Thread Jakub Jelinek
On Fri, Mar 09, 2018 at 02:23:13PM +0100, Richard Biener wrote: > > With -Os we inhibit most loop header copying which in turn will disable > any vectorization attempt either via -fopenmp or via -ftree-vectorize. > > The following makes sure the aggressive gate in >

Re: [C++ PATCH] For -Wformat purposes use ellipsis args before class to pointer to class conversion (PR c++/84076)

2018-03-09 Thread Jason Merrill
OK. On Fri, Mar 9, 2018 at 12:21 PM, Jakub Jelinek wrote: > On Fri, Mar 09, 2018 at 11:28:47AM -0500, Jason Merrill wrote: >> On Thu, Mar 8, 2018 at 4:26 PM, Jakub Jelinek wrote: >> > On Thu, Mar 08, 2018 at 04:20:40PM -0500, Jason Merrill wrote: >> >> On

Re: [C++ Patch] PR 71169 ("[7/8 Regression] ICE on invalid C++ code in pop_nested_class"), PR 71832 and more (Take 2)

2018-03-09 Thread Jason Merrill
Hmm, actually I think any_erroneous_template_args will return false for error_mark_node. Just moving the error_mark_node check up should correct that. OK with that change. On Fri, Mar 9, 2018 at 10:40 AM, Paolo Carlini wrote: > Hi, > > On 09/03/2018 16:17, Jason

Re: [C++ PATCH] Don't redefine __* builtins (PR c++/84724, take 2)

2018-03-09 Thread Jason Merrill
OK. On Fri, Mar 9, 2018 at 6:05 AM, Jakub Jelinek wrote: > On Thu, Mar 08, 2018 at 04:06:24PM -0500, Jason Merrill wrote: >> On Thu, Mar 8, 2018 at 1:01 PM, Jakub Jelinek wrote: >> > The C FE just warns and doesn't override builtins, but C++ FE >> > on say

Re: patch to fix PR83712

2018-03-09 Thread Jeff Law
On 03/09/2018 09:16 AM, Vladimir Makarov wrote: > The following patch fixes > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83712 > > It is another "cannot find a spill reg for reload" problem.  LRA has > already a code splitting hard reg live ranges to avoid such problem.  > This code is in

patch to fix PR83712

2018-03-09 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83712 It is another "cannot find a spill reg for reload" problem.  LRA has already a code splitting hard reg live ranges to avoid such problem.  This code is in LRA inheritance pass.  Unfortunately, the code does

Re: [og7] Update nvptx_fork/join barrier placement

2018-03-09 Thread Tom de Vries
On 03/09/2018 12:31 AM, Cesar Philippidis wrote: Nvidia Volta GPUs now support warp-level synchronization. Well, let's try to make that statement a bit more precise. All Nvidia architectures have supported synchronization of threads in a warp on a very basic level: by means of convergence

Re: [C++ PATCH] For -Wformat purposes use ellipsis args before class to pointer to class conversion (PR c++/84076)

2018-03-09 Thread Jason Merrill
On Thu, Mar 8, 2018 at 4:26 PM, Jakub Jelinek wrote: > On Thu, Mar 08, 2018 at 04:20:40PM -0500, Jason Merrill wrote: >> On Thu, Mar 8, 2018 at 1:08 PM, Jakub Jelinek wrote: >> > The reporter complains that -Wformat incorrectly reports std::string* >> >