Re: [PATCH] handle strings as template arguments (PR 47488, 89833, 89876)

2019-04-04 Thread H.J. Lu
On Thu, Apr 4, 2019 at 11:30 AM Martin Sebor wrote: > > On 4/4/19 10:50 AM, Jason Merrill wrote: > > On 4/4/19 12:29 PM, Martin Sebor wrote: > >> On 4/4/19 8:57 AM, Jason Merrill wrote: > >>> On 4/3/19 10:34 PM, Martin Sebor wrote: > On 4/1/19 11:27 AM, Jason Merrill wrote: > > On 3/31/19

Re: C++ PATCH for c++/87145 - bogus error converting class type in template argument list

2019-04-04 Thread Jason Merrill
On 4/4/19 5:18 PM, Marek Polacek wrote: On Thu, Mar 28, 2019 at 03:54:30PM -0400, Jason Merrill wrote: On 3/20/19 4:12 PM, Marek Polacek wrote: The fix for 77656 caused us to call convert_nontype_argument even for value-dependent arguments, to perform the conversion in order to avoid a bogus wa

Re: C/C++ PATCH for c++/89973 - -Waddress-of-packed-member ICE with invalid conversion

2019-04-04 Thread Jason Merrill
On 4/4/19 7:20 PM, Marek Polacek wrote: We ICE here because rhstype is null. Since we're looking to see if it's a pointer type, we can just return NULL_TREE if it's null. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-04-04 Marek Polacek PR c++/89973 - -Waddress-of-pack

[C++ PATCH] PR c++/89948 - ICE with break in statement-expr.

2019-04-04 Thread Jason Merrill
If 'jump_target' is local to this function and still set at the end, we can't correctly evaluate it, and we don't need to try. * constexpr.c (cxx_eval_statement_list): Jumping out of a statement-expr is non-constant. Tested x86_64-pc-linux-gnu, applying to trunk. --- gcc/cp/const

[C++ PATCH] PR c++/89966 - error with non-type auto tparm.

2019-04-04 Thread Jason Merrill
My patch for PR 86932 broke this testcase by passing tf_partial to coerce_template_template_parms, which prevented do_auto_deduction from actually replacing the auto. Tested x86_64-pc-linux-gnu, applying to trunk. * pt.c (do_auto_deduction): Clear tf_partial. --- gcc/cp/pt.c

[C++ PATCH] PR c++/86986 - ICE with TTP with parameter pack.

2019-04-04 Thread Jason Merrill
Three separate issues were breaking this testcase. One, we were trying to look at the type of a template template parameter to see if it's a valid non-type template parameter. Two, we were treating a parameter pack named in the type of a template parameter pack of a TTP pack as being one of the p

RFA: Fix uninitialized memory use in sched_macro_fuse_insns

2019-04-04 Thread Joern Rennecke
sched_macro_fuse_insns uses the value in condreg1 without checking the return value of targetm.fixed_condition_code_regs. As this variables is not initialized anywhere, this leads to constructing cc_reg_1 with an undefined value, and then using that in reg_referenced_p, if TARGET_FIXED_CONDITION_C

C/C++ PATCH for c++/89973 - -Waddress-of-packed-member ICE with invalid conversion

2019-04-04 Thread Marek Polacek
We ICE here because rhstype is null. Since we're looking to see if it's a pointer type, we can just return NULL_TREE if it's null. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-04-04 Marek Polacek PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.

Re: [PATCH][MIPS] Fix pr89623 Can't build mips-wrs-vxworks cross-compiler

2019-04-04 Thread Jeff Law
On 4/4/19 3:00 AM, Paul Hua wrote: > Hi, > > The MIPS target run out of Mask in mips.opt, we are stage4, this > patch retrieve loongson-ext that haven't used yet for now. In next > stage1, I will rewrite those part use HOST_WIDE_INT or same thing like > that. > > Ok for commit ? > > 2019-04-04

Re: PING [PATCH] fix ICE in __builtin_has_attribute (PR 88383 and 89288)

2019-04-04 Thread Jeff Law
On 3/21/19 3:59 PM, Martin Sebor wrote: > On 3/19/19 9:33 PM, Jeff Law wrote: >> On 3/19/19 8:22 PM, Joseph Myers wrote: >>> On Tue, 19 Mar 2019, Jeff Law wrote: >>> I'll note that our documentation clearly states that attributes can be applied to functions, variables, labels, enums, stat

Re: [PATCH] avoid more ICE due to bad built-in calls declared without a prototype (PR 89911, 89957)

2019-04-04 Thread Jeff Law
On 4/4/19 3:42 PM, Martin Sebor wrote: > Attached is yet another patch to avoid ICE due to middle-end > assumptions about the sanity of calls to built-ins, this time > for strnlen.  It fixes two unsafe assumptions: > > 1) The -Wstringop-overflow checker for unterminated constant char >    arrays a

[PATCH] avoid more ICE due to bad built-in calls declared without a prototype (PR 89911, 89957)

2019-04-04 Thread Martin Sebor
Attached is yet another patch to avoid ICE due to middle-end assumptions about the sanity of calls to built-ins, this time for strnlen. It fixes two unsafe assumptions: 1) The -Wstringop-overflow checker for unterminated constant char arrays assumes that strnlen is called with exactly two arg

Re: Make FMA code cope with redundant negates (PR89956)

2019-04-04 Thread Jeff Law
On 4/4/19 4:43 AM, Richard Sandiford wrote: > This patch fixes a case in which, due to forced missed optimisations > in earlier passes, we have: > > _1 = a * b > _2 = -_1 > _3 = -_1 > _4 = _2 + _3 > > and treated _4 as two FNMA candidates, once via _2 and once via _3. > > Tested

Re: C++ PATCH for c++/87145 - bogus error converting class type in template argument list

2019-04-04 Thread Marek Polacek
On Thu, Mar 28, 2019 at 03:54:30PM -0400, Jason Merrill wrote: > On 3/20/19 4:12 PM, Marek Polacek wrote: > > The fix for 77656 caused us to call convert_nontype_argument even for > > value-dependent arguments, to perform the conversion in order to avoid > > a bogus warning. > > > > In this case,

Re: [PATCH] Remove usage of apostrophes in error and warning messages (PR translation/89935).

2019-04-04 Thread Jeff Law
On 4/3/19 4:17 AM, Martin Liška wrote: > Hi. > > The patch addresses wrong usage of apostrophes in error and warning > messages. It's follow up of what I did couple of weeks ago. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Mar

Re: [PATCH] avoid an other ICE due to invalid built-in call (PR 89934)

2019-04-04 Thread Jeff Law
On 4/3/19 1:27 PM, Martin Sebor wrote: > PR 89934 reports yet another ICE due to a call to a library > built-in function with invalid arguments.  The attached patch > does the bare minimum to avoid it.  I will commit it to trunk > and to GCC 8 later this week if there are no objections. > > Martin

[committed][PR rtl-optimization/89399] Safely access the source/destination of sets

2019-04-04 Thread Jeff Law
As noted in the BZ ree was incorrectly looking at SET_SRC/SET_DEST of PATTERN of various insns. In the case where we're looking at something in the candidate list, we know that all the insns passed the single_set test. So when digging into something from the candidate list, we should call single_

Re: [Patch, fortran] PR89904 - ICE in gfortran starting with r270045

2019-04-04 Thread Thomas Koenig
Hi Harald, OK for trunk (and affected backports)? Yes, OK. Thanks! (For cases like this, it often makes sense to wait a week or so before backporting something, to see if anything comes up). Regards Thomas

Re: [PATCH] handle strings as template arguments (PR 47488, 89833, 89876)

2019-04-04 Thread Jason Merrill
On 4/4/19 2:30 PM, Martin Sebor wrote: On 4/4/19 10:50 AM, Jason Merrill wrote: On 4/4/19 12:29 PM, Martin Sebor wrote: On 4/4/19 8:57 AM, Jason Merrill wrote: On 4/3/19 10:34 PM, Martin Sebor wrote: On 4/1/19 11:27 AM, Jason Merrill wrote: On 3/31/19 10:17 PM, Martin Sebor wrote: To fix PR

Re: [PATCH] handle strings as template arguments (PR 47488, 89833, 89876)

2019-04-04 Thread Martin Sebor
On 4/4/19 10:50 AM, Jason Merrill wrote: On 4/4/19 12:29 PM, Martin Sebor wrote: On 4/4/19 8:57 AM, Jason Merrill wrote: On 4/3/19 10:34 PM, Martin Sebor wrote: On 4/1/19 11:27 AM, Jason Merrill wrote: On 3/31/19 10:17 PM, Martin Sebor wrote: To fix PR 89833, a P1 regression, the attached pa

Re: [PATCH] Fix PR83033

2019-04-04 Thread Richard Earnshaw (lists)
On 29/03/2019 11:01, Andrea Corallo wrote: > Hi all, > simple patch addressing minor style issue into > gcc/config/aarch64/cortex-a57-fma-steering.c. > > make BOOT_CFLAGS='-mcpu=cortex-a57' bootstrap > > Okay for trunk? > > Bests > Andrea > > > 2019-03-29 Andrea Corallo > > PR tar

Re: [PATCH] handle strings as template arguments (PR 47488, 89833, 89876)

2019-04-04 Thread Jason Merrill
On 4/4/19 12:29 PM, Martin Sebor wrote: On 4/4/19 8:57 AM, Jason Merrill wrote: On 4/3/19 10:34 PM, Martin Sebor wrote: On 4/1/19 11:27 AM, Jason Merrill wrote: On 3/31/19 10:17 PM, Martin Sebor wrote: To fix PR 89833, a P1 regression, the attached patch tries to handle string literals as C++

Re: [PATCH] handle strings as template arguments (PR 47488, 89833, 89876)

2019-04-04 Thread Martin Sebor
On 4/4/19 8:57 AM, Jason Merrill wrote: On 4/3/19 10:34 PM, Martin Sebor wrote: On 4/1/19 11:27 AM, Jason Merrill wrote: On 3/31/19 10:17 PM, Martin Sebor wrote: To fix PR 89833, a P1 regression, the attached patch tries to handle string literals as C++ 2a non-type template arguments by treati

Re: [PATCH, GCC, AARCH64] Add GNU note section with BTI and PAC.

2019-04-04 Thread Sudakshina Das
Hi Richard On 03/04/2019 11:28, Richard Henderson wrote: > On 4/3/19 5:19 PM, Sudakshina Das wrote: >> + /* PT_NOTE header: namesz, descsz, type. >> + namesz = 4 ("GNU\0") >> + descsz = 16 (Size of the program property array) >> + type = 5 (NT_GNU_PROPERTY_TYPE_0). */ >> +

Re: [PATCH] handle strings as template arguments (PR 47488, 89833, 89876)

2019-04-04 Thread Jason Merrill
On 4/3/19 10:34 PM, Martin Sebor wrote: On 4/1/19 11:27 AM, Jason Merrill wrote: On 3/31/19 10:17 PM, Martin Sebor wrote: To fix PR 89833, a P1 regression, the attached patch tries to handle string literals as C++ 2a non-type template arguments by treating them the same as brace enclosed initia

Re: [PATCH] Fix a missed case in predicate analysis of the late uninit pass

2019-04-04 Thread Vladislav Ivanishin
Richard Biener writes: > On Mon, Apr 1, 2019 at 5:36 PM Vladislav Ivanishin wrote: >> >> Hi! >> >> This is a fairly trivial change fixing a false negative in >> -Wmaybe-uninitialized. I am pretty sure this is simply an overlooked >> case (is_value_included_in() is not meant to deal with the cas

Re: [PATCH][RFC] Fix PRs 88882, 89905, 89892 (and more?)

2019-04-04 Thread Richard Biener
On Thu, 4 Apr 2019, Alexandre Oliva wrote: > On Apr 3, 2019, Richard Biener wrote: > > > My solution is to instead of dropping the debug binds still > > move them to the destination but then reset them. This solves > > the wrong-debug issue. > > *nod*, yeah, that's probably the best we can do

Re: PR 89864 - gcc fails to build/bootstrap with XCode 10.2

2019-04-04 Thread Iain Sandoe
Hi Erik, > On 4 Apr 2019, at 12:56, Erik Schnetter wrote: > > On Thu, Apr 4, 2019 at 3:11 AM Iain Sandoe wrote: > What doesn't work was that this requires changing . If only > can be changed, then it is not possible to replace _Atomic > ulong by _Atomic(ulong) (adding parentheses). I'll try

Re: PR 89864 - gcc fails to build/bootstrap with XCode 10.2

2019-04-04 Thread Erik Schnetter
On Thu, Apr 4, 2019 at 3:11 AM Iain Sandoe wrote: > Hi Eric, > > Thanks for working on this! > > > On 4 Apr 2019, at 04:00, Erik Schnetter wrote: > > > > Fixinclude the header file that incorrectly uses the C-only > > _Atomic keyword when compiled as C++. Apply the same work-around for two > >

Make FMA code cope with redundant negates (PR89956)

2019-04-04 Thread Richard Sandiford
This patch fixes a case in which, due to forced missed optimisations in earlier passes, we have: _1 = a * b _2 = -_1 _3 = -_1 _4 = _2 + _3 and treated _4 as two FNMA candidates, once via _2 and once via _3. Tested on aarch64-linux-gnu. OK to install? Richard 2019-04-04 Richa

Re: [PATCH][RFC] Fix PRs 88882, 89905, 89892 (and more?)

2019-04-04 Thread Alexandre Oliva
On Apr 3, 2019, Richard Biener wrote: > My solution is to instead of dropping the debug binds still > move them to the destination but then reset them. This solves > the wrong-debug issue. *nod*, yeah, that's probably the best we can do without major surgery. > But it of course possibly degra

Re: [PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-04 Thread Jonathan Wakely
On 03/04/19 23:27 +0100, Jonathan Wakely wrote: On 03/04/19 23:32 +0300, Antony Polukhin wrote: Looks good. Covers most of the use cases. Please consider adding filesystem::path, pair, tuple, string_view?, string_view is trivially_copyable, and < 256 bytes, so works automatically. error_cod

[PATCH][MIPS] Fix pr89623 Can't build mips-wrs-vxworks cross-compiler

2019-04-04 Thread Paul Hua
Hi, The MIPS target run out of Mask in mips.opt, we are stage4, this patch retrieve loongson-ext that haven't used yet for now. In next stage1, I will rewrite those part use HOST_WIDE_INT or same thing like that. Ok for commit ? 2019-04-04 Chenghua Xu gcc/ PR target/89623

[PATCH] backport r257541, r259936, r260294, r260623, r261098, r261333, r268585.

2019-04-04 Thread luoxhu
From: Xiong Hu Luo These patches are followed changes for r25 on testcases vsx-vector-6*.c. backport them to update file names and fix regressions for GCC7 on power9. Regression tested on power7-be, power8-be, power8-le, power9. gcc/ChangeLog: 2019-04-03 Xiong Hu Luo backport f

Re: [PATCH] Fix PR71598, aliasing between enums and compatible types

2019-04-04 Thread Christophe Lyon
On Wed, 3 Apr 2019 at 20:24, Ian Lance Taylor wrote: > > On Wed, Apr 3, 2019 at 6:19 AM Christophe Lyon > wrote: > > > > Thanks, here is what I have committed as r270126. > > (skip one test on short_enums targets, skip the other one on > > non-short_enums targets) > > I noticed that your testsuit

Re: PR 89864 - gcc fails to build/bootstrap with XCode 10.2

2019-04-04 Thread Iain Sandoe
Hi Eric, Thanks for working on this! > On 4 Apr 2019, at 04:00, Erik Schnetter wrote: > > Fixinclude the header file that incorrectly uses the C-only > _Atomic keyword when compiled as C++. Apply the same work-around for two > GCC source files that transitively use this header file. 1/ If the