Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-24 Thread Bernd Edlinger
On 08/25/18 01:54, Jeff Law wrote: > On 08/24/2018 11:26 AM, Bernd Edlinger wrote: >> On 08/24/18 18:51, Jeff Law wrote: Well, this is broken for wide character strings. but I hope we can get rid of STRING_CST which are not explicitly null terminated. >> >> I am afraid that is not go

Re: ToT build problem on Aarch64 after cfg.h change

2018-08-24 Thread Richard Biener
On August 25, 2018 1:05:46 AM GMT+02:00, Jeff Law wrote: >On 08/24/2018 05:04 PM, Steve Ellcey wrote: >> Richard, >> >> I am having a problem building GCC after this patch: >> >> commit 2515797e5db67076d6cf7f3f185757c841f79edf >> Author: rguenth >> Date:   Fri Aug 24 11:17:16 2018 + >> >>

Re: [PATCH 2/3] GDB: Add support for 24 bit addresses

2018-08-24 Thread John Darrington
On Fri, Aug 24, 2018 at 04:34:11PM -0400, Simon Marchi wrote: (CCing gcc-patches because of the change in include/dwarf2.h) This file is owned by GCC (see the MAINTAINERS file at the top of binutils-gdb). To get a modification in it, you would need to provide a patch to g

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-24 Thread Jeff Law
On 08/24/2018 11:26 AM, Bernd Edlinger wrote: > On 08/24/18 18:51, Jeff Law wrote: >>> Well, this is broken for wide character strings. >>> but I hope we can get rid of STRING_CST which are >>> not explicitly null terminated. > > I am afraid that is not going to happen. > Maybe we can get STRING_C

Re: PING^1: [PATCH] Set start_location to 0 if we ran out of line map space

2018-08-24 Thread H.J. Lu
On Fri, Aug 24, 2018 at 4:05 PM, David Malcolm wrote: > On Wed, 2018-08-22 at 12:48 -0700, H.J. Lu wrote: >> PING. > > [stripping out-of-date address for Tom Tromey from recipients] > > Sorry for the belated response. > >> -- Forwarded message -- >> From: H.J. Lu >> Date: Wed, Aug

Re: ToT build problem on Aarch64 after cfg.h change

2018-08-24 Thread Jeff Law
On 08/24/2018 05:04 PM, Steve Ellcey wrote: > Richard, > > I am having a problem building GCC after this patch: > > commit 2515797e5db67076d6cf7f3f185757c841f79edf > Author: rguenth > Date:   Fri Aug 24 11:17:16 2018 + > > 2018-08-24  Richard Biener   >     > * cfg.h (struct con

Re: PING^1: [PATCH] Set start_location to 0 if we ran out of line map space

2018-08-24 Thread David Malcolm
On Wed, 2018-08-22 at 12:48 -0700, H.J. Lu wrote: > PING. [stripping out-of-date address for Tom Tromey from recipients] Sorry for the belated response. > -- Forwarded message -- > From: H.J. Lu > Date: Wed, Aug 15, 2018 at 4:33 AM > Subject: [PATCH] Set start_location to 0 if w

ToT build problem on Aarch64 after cfg.h change

2018-08-24 Thread Steve Ellcey
Richard, I am having a problem building GCC after this patch: commit 2515797e5db67076d6cf7f3f185757c841f79edf Author: rguenth Date:   Fri Aug 24 11:17:16 2018 + 2018-08-24  Richard Biener       * cfg.h (struct control_flow_graph): Add edge_flags_allocated and bb_flags_al

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-24 Thread Bernd Edlinger
On 08/24/18 18:04, Jeff Law wrote: > On 08/24/2018 06:27 AM, Bernd Edlinger wrote: > [ Lots of snipping throughout ] > > > + > if (TREE_CODE (src) == COND_EXPR > && (only_value || !TREE_SIDE_EFFECTS (TREE_OPERAND (src, 0 >{ > - tree len1, le

[PATCH] Adjust string_constant to new STRING_CST semantics

2018-08-24 Thread Bernd Edlinger
Hi, I noticed that the latest patches to make STRING_CST semantics for literals and for initializers consistent also fixes PR 86711 and PR 86714 (but not PR 87053). The code change in the string_constant does not change any test case, the new test cases are already fixed once we have the unified

[committed] diagnostics: tweaks to line-spans vs line numbering (PR 87091)

2018-08-24 Thread David Malcolm
This patch tweaks how line numbers are printed for a diagnostic containing multiple line spans. With this patch, rather than printing span headers: ../x86_64-pc-linux-gnu/libstdc++-v3/include/vector:87:22: note: message ../x86_64-pc-linux-gnu/libstdc++-v3/include/vector:74:1: ++ |+#include

C++ PATCH for c++/87080, ICE with -Wpessimizing-move

2018-08-24 Thread Marek Polacek
The problem in this testcase was that we were calling is_std_move_p from template context, which breaks in cp_get_fndecl_from_callee. This warning is not meant to warn while parsing a template, so I think we should apply this. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2018-08-24 Mar

Re: [PATCH 2/3] GDB: Add support for 24 bit addresses

2018-08-24 Thread Simon Marchi
(CCing gcc-patches because of the change in include/dwarf2.h) On 2018-08-23 13:35, John Darrington wrote: * include/dwarf2.h (enum dwarf_unit_type)[DW_EH_PE_udata3]: New member. * gdb/dwarf2-frame.c (encoding_for_size): Deal with case 3. (read_encoded_value): Deal with case DW_EH_PE_

Re: [PATCH] Check the STRING_CSTs in varasm.c

2018-08-24 Thread Bernd Edlinger
Hi! This is an alternative approach in making STRING_CST semantics consistent. This means it makes STRING_CST used for literals and for initializers use exactly the same semantics. It makes sure that all STRING_CST have a TYPE_SIZE_UNIT, and that it is always larger than TREE_STRING_LENGTH, the

[PATCHv2] Handle overlength string literals in the fortan FE

2018-08-24 Thread Bernd Edlinger
Hi! This is an alternative approach to handle overlength strings in the Fortran FE. The difference to the previous version is that overlength STRING_CST never have a longer TREE_STRING_LENGTH than the TYPE_DOMAIN. And those STRING_CSTs are thus no longer zero terminated. And the requirement to

[PATCHv2] Handle overlength strings in C++ FE

2018-08-24 Thread Bernd Edlinger
Hi! This is an alternative approach to handle overlength strings in the C++ FE. The difference to the previous version is that overlength STRING_CST never have a longer TREE_STRING_LENGTH than the TYPE_DOMAIN. And those STRING_CSTs are thus no longer zero terminated. Bootstrapped and reg-tested

[PATCHv2] Handle overlength strings in the C FE

2018-08-24 Thread Bernd Edlinger
Hi! This is an alternative approach handle overlength strings in the C FE. The difference to the previous version is that overlength STRING_CST never have a longer TREE_STRING_LENGTH than the TYPE_DOMAIN. And those STRING_CSTs are thus no longer zero terminated. Bootstrapped and reg-tested on x

[PATCHv2] Call braced_list_to_string after array size is fixed

2018-08-24 Thread Bernd Edlinger
Hi, this updated patch fixes one regression with current trunk due to a new test case. Sorry for the confusion. The change to the previous version is: 1) the check to avoid folding on empty char arrays is restored. 2) A null-termination character is added except when the string is full length.

Re: C++ PATCH for c++/87029, Implement -Wredundant-move

2018-08-24 Thread Marek Polacek
On Fri, Aug 24, 2018 at 11:32:18PM +1000, Jason Merrill wrote: > On Fri, Aug 24, 2018 at 12:53 AM, Marek Polacek wrote: > > On Thu, Aug 23, 2018 at 10:44:30AM -0400, Marek Polacek wrote: > >> +T > >> +fn3 (const T t) > >> +{ > >> + // t is const: will decay into move. > >> + return t; > >> +} >

[PATCH] convert MIN_EXPR operands to the same type (PR 87059)

2018-08-24 Thread Martin Sebor
PR 87059 points out an ICE in the recently enhanced VRP code that was traced back to a MIN_EXPR built out of operands of types with different sign by expand_builtin_strncmp(). The attached patch adjusts the function to make sure both operands have the same type, and to make these mismatches easie

Re: [PATCH]: Remove remaining traces of MPX bounded pointers

2018-08-24 Thread Jakub Jelinek
On Fri, Aug 24, 2018 at 03:56:27PM +0200, Uros Bizjak wrote: > 2018-08-23 Uros Bizjak > > * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes. > * emit-rtl.h (rtl_data): Remove return_bnd. > * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P. >

Re: VRP: make range_includes_zero_p handle value_ranges

2018-08-24 Thread Aldy Hernandez
On 08/24/2018 05:08 AM, Richard Biener wrote: @@ -1407,7 +1407,10 @@ extract_range_from_binary_expr_1 (value_range *vr, && code != POINTER_PLUS_EXPR && (vr0.type == VR_VARYING || vr1.type == VR_VARYING - || vr0.type != vr1.type + || (vr0.type != vr1.

Go patch committed: Remove the dummy arg of getcallersp

2018-08-24 Thread Ian Lance Taylor
This patch changes the Go compiler and libgo runtime package to remove the dummy argument of runtime.getcallersp. This is a port of https://golang.org/cl/109596 to the gofrontend, in preparation for updating libgo to 1.11. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to ma

[PATCH] Forward declare debug containers so std::pmr aliases work

2018-08-24 Thread Jonathan Wakely
Prior to this change, including a header when _GLIBCXX_DEBUG is also defined would fail to compile in C++17 or later. The header would include the standard header which defined std::pmr::xxx as an alias for std::xxx. But in Debug Mode std::xxx refers to std::__debug::xxx which has not been defi

Re: lightweight class to wide int ranges in VRP and friends

2018-08-24 Thread Aldy Hernandez
On 08/24/2018 06:32 AM, Richard Biener wrote: On Wed, Aug 15, 2018 at 7:31 PM Aldy Hernandez wrote: I kept seeing the same patterns over and over in all this re-factoring: 1. extract value_range constants into pairs of wide ints 2. mimic symbolics as [-MIN, +MAX] (most of the time :)) 3. pe

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-24 Thread Bernd Edlinger
On 08/24/18 18:51, Jeff Law wrote: > On 08/02/2018 07:26 AM, Bernd Edlinger wrote: >> >>> - if (compare_tree_int (array_size, length + 1) < 0) >>> + if (nulterm) >> but here you compare bytes with length which is measued un chars. >> >>> +*nulterm = array_elts > length; >>> + else if (array_

Re: [PR 87073] [committed] fix go bootstrap

2018-08-24 Thread Aldy Hernandez
On 08/24/2018 12:56 PM, H.J. Lu wrote: n Fri, Aug 24, 2018 at 1:02 AM Aldy Hernandez wrote: I have no idea how this passed bootstrap and tests in other languages. The problem here is that wide_int_binop is overflowing on TRUNC_DIV_EXPR and a range in Go. This is causing us to use wmin/wma

Re: [PR 87073] [committed] fix go bootstrap

2018-08-24 Thread H.J. Lu
n Fri, Aug 24, 2018 at 1:02 AM Aldy Hernandez wrote: > > I have no idea how this passed bootstrap and tests in other languages. > > The problem here is that wide_int_binop is overflowing on TRUNC_DIV_EXPR > and a range in Go. This is causing us to use wmin/wmax uninitialized. > > Serves me right

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-24 Thread Jeff Law
On 08/02/2018 07:26 AM, Bernd Edlinger wrote: > >> - if (compare_tree_int (array_size, length + 1) < 0) >> + if (nulterm) > but here you compare bytes with length which is measued un chars. > >> +*nulterm = array_elts > length; >> + else if (array_elts <= length) >> return NULL_TREE;

[PR 87059] kludge over MIN_EXPR problem causing VRP failure in value ranges

2018-08-24 Thread Aldy Hernandez
As discussed in the PR, the MIN_EXPR being passed to VRP has incompatible signs. I expect MIN_EXPR to have the same type for all arguments plus the MIN_EXPR node itself, but this is not the case. The culprit on PPC is expand_builtin_strncmp, but fixing it there causes other problems on x86-64

Re: new(nothrow) is malloc-like

2018-08-24 Thread Jonathan Wakely
On 24/08/18 18:25 +0200, Marc Glisse wrote: Hello, this makes the throwing and non-throwing versions of operator new more consistent with respect to __attribute__((malloc)). The throwing versions are already unconditionally declared with DECL_IS_MALLOC = 1 in the front-end. Bootstrap+regtes

new(nothrow) is malloc-like

2018-08-24 Thread Marc Glisse
Hello, this makes the throwing and non-throwing versions of operator new more consistent with respect to __attribute__((malloc)). The throwing versions are already unconditionally declared with DECL_IS_MALLOC = 1 in the front-end. Bootstrap+regtest on powerpc64le-unknown-linux-gnu. I manuall

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-24 Thread Jeff Law
On 08/24/2018 06:27 AM, Bernd Edlinger wrote: [ Lots of snipping throughout ] >>> + if (TREE_CODE (src) == COND_EXPR && (only_value || !TREE_SIDE_EFFECTS (TREE_OPERAND (src, 0 { - tree len1, len2; - - len1 = c_strlen (TREE_OPERAND

[PATCH] avoid warning on constant strncpy until next statement is reachable (PR 87028)

2018-08-24 Thread Martin Sebor
The warning suppression for -Wstringop-truncation looks for the next statement after a truncating strncpy to see if it adds a terminating nul. This only works when the next statement can be reached using the Gimple statement iterator which isn't until after gimplification. As a result, strncpy c

Re: [PATCH,Darwin, config] Fix PR70694; don't force visibility on inlines for Darwin > 8

2018-08-24 Thread Jonathan Wakely
On 24/08/18 16:09 +0100, Iain Sandoe wrote: At some point, with the toolchain components available to Darwin8, it was preferable to force everything generated by headers to be hidden. However, the work-around wasn’t limited and it has caused Darwin x86/x86_64 to have a blanket application of "-f

[PATCH][debug] Add -gdescribe-dies

2018-08-24 Thread Tom de Vries
[ was: Re: [PATCH][debug] Add -gdescriptive-dies ] On Fri, Aug 24, 2018 at 12:44:38PM +0200, Richard Biener wrote: > On Wed, 22 Aug 2018, Tom de Vries wrote: > > > [ was: Re: [PATCH][debug] Add -gforce-named-dies ] > > > > On 08/22/2018 11:46 AM, Tom de Vries wrote: > > > On 08/22/2018 08:56 AM,

Re: [PATCH] treat -Wxxx-larger-than=HWI_MAX special (PR 86631)

2018-08-24 Thread Martin Sebor
On 08/24/2018 03:36 AM, Richard Biener wrote: On Fri, Aug 24, 2018 at 12:35 AM Martin Sebor wrote: On 08/23/2018 07:18 AM, Richard Biener wrote: On Thu, Aug 23, 2018 at 12:20 AM Martin Sebor wrote: On 08/20/2018 06:14 AM, Richard Biener wrote: On Thu, Jul 26, 2018 at 10:52 PM Martin Sebor

[PATCH,Darwin, config] Fix PR70694; don't force visibility on inlines for Darwin > 8

2018-08-24 Thread Iain Sandoe
At some point, with the toolchain components available to Darwin8, it was preferable to force everything generated by headers to be hidden. However, the work-around wasn’t limited and it has caused Darwin x86/x86_64 to have a blanket application of "-fvisibility-inlines-hidden” ever since. Since,

Re: OpenRISC Port Submission

2018-08-24 Thread Richard Henderson
On 08/23/2018 06:04 PM, David Edelsohn wrote: > Stafford, > > Thanks for rewriting and contributing the new OpenRISC port for GCC. I have > forwarded your request to the GCC Steering Committee to formally accept the > contribution. > > The port still requires a technical review and approval from

Re: [PATCH]: Remove remaining traces of MPX bounded pointers

2018-08-24 Thread Jeff Law
On 08/24/2018 07:56 AM, Uros Bizjak wrote: > 2018-08-23 Uros Bizjak > > * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes. > * emit-rtl.h (rtl_data): Remove return_bnd. > * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P. > * function.c (did

[PATCH] Fix overeager spelling corrections (PR c/82967)

2018-08-24 Thread David Malcolm
This patch tunes class best_match's cutoff for rejecting meaningless spelling suggestions. Previously, we allowed an edit distance of up to half of the length of the longer of the goal string and closest candidate strings, rounded down. With this patch, we now allow only up to a third - with some

Optimize sreal normalization

2018-08-24 Thread Jan Hubicka
Hi, this patch makes new exp and sig explicit parameter of normalize function. This is better for inline analysis to track when the result is going to be constant and make sus to inline sreal constructor for constants. My main motivation is however to change memory representation of sreal so we d

[PATCH]: Remove remaining traces of MPX bounded pointers

2018-08-24 Thread Uros Bizjak
2018-08-23 Uros Bizjak * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes. * emit-rtl.h (rtl_data): Remove return_bnd. * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P. * function.c (diddle_return_value): Do not handle crtl->return_bnd.

Re: C++ PATCH for c++/87029, Implement -Wredundant-move

2018-08-24 Thread Jason Merrill
On Fri, Aug 24, 2018 at 12:53 AM, Marek Polacek wrote: > On Thu, Aug 23, 2018 at 10:44:30AM -0400, Marek Polacek wrote: >> +T >> +fn3 (const T t) >> +{ >> + // t is const: will decay into move. >> + return t; >> +} >> + >> +T >> +fn4 (const T t) >> +{ >> + // t is const: will decay into move de

[PATCH] Use complete_array_type on flexible array member initializers

2018-08-24 Thread Bernd Edlinger
Hi! This patch prevents init values of STRING_CST and braced array initializers to reach the middle-end with incomplete type. This will allow further simplifications in the middle-end, and address existing issues with STRING_CST in a correct way. Bootstrapped and reg-tested on x86_64-pc-linux

Re: Avoid is_constant calls in vectorizable_bswap

2018-08-24 Thread Richard Biener
On Thu, Aug 23, 2018 at 11:09 AM Richard Sandiford wrote: > > The "new" VEC_PERM_EXPR handling makes it easy to support bswap > for variable-length vectors. > > Tested on aarch64-linux-gnu (with and without SVE), aarch64_be-elf > and x86_64-linux-gnu. OK to install? OK. Richard. > Richard > >

Re: Handle SLP permutations for variable-length vectors

2018-08-24 Thread Richard Biener
On Thu, Aug 23, 2018 at 11:08 AM Richard Sandiford wrote: > > The SLP code currently punts for all variable-length permutes. > This patch makes it handle the easy case of N->N permutes in which > the number of vector lanes is a multiple of N. Every permute then > uses the same mask, and that mask

Re: C++ PATCH for c++/67012, c++/86942, detect invalid cases with function return type deduction

2018-08-24 Thread Jason Merrill
On Fri, Aug 24, 2018 at 3:01 AM, Marek Polacek wrote: > On Tue, Aug 21, 2018 at 11:59:06PM +1200, Jason Merrill wrote: >> On Fri, Aug 17, 2018 at 2:17 PM, Marek Polacek wrote: >> > As I promised in >> > , >> > this patch fixes a couple of

Re: [PATCH] Improve checks in c_strlen (PR 87053)

2018-08-24 Thread Bernd Edlinger
On 08/24/18 07:58, Jeff Law wrote: > On 08/23/2018 03:27 AM, Bernd Edlinger wrote: >> On 08/22/18 18:28, Martin Sebor wrote: >>> On 08/22/2018 08:41 AM, Bernd Edlinger wrote: Hi! This patch adds some more checks to c_getstr to fix PR middle-end/87053 wrong code bug. >>

Re: PING [PATCH] warn for strlen of arrays with missing nul (PR 86552, 86711, 86714) )

2018-08-24 Thread Bernd Edlinger
On 08/24/18 08:36, Jeff Law wrote: > On 08/02/2018 07:26 AM, Bernd Edlinger wrote: >> On 08/02/18 04:44, Martin Sebor wrote: >>> Since the foundation of the patch is detecting and avoiding >>> the overly aggressive folding of unterminated char arrays, >>> besides issuing a warning for such argument

Re: [PATCH] Print default options selection for -march,-mcpu and -mtune for aarch64 (PR driver/83193).

2018-08-24 Thread Martin Liška
On 08/23/2018 04:46 PM, Richard Earnshaw (lists) wrote: > On 02/08/18 10:46, Martin Liška wrote: >> On 08/02/2018 11:39 AM, Richard Earnshaw (lists) wrote: >>> On 18/07/18 16:48, Martin Liška wrote: Hi. This is aarch64 fix for PR83193. It's about setting of default options so th

Re: [PATCH] Make GO string literals properly NUL terminated

2018-08-24 Thread Bernd Edlinger
On 08/24/18 12:52, Richard Biener wrote: > On Wed, Aug 22, 2018 at 6:57 AM Bernd Edlinger > wrote: >> >> On 08/21/18 10:33, Richard Biener wrote: >>> On Mon, 20 Aug 2018, Bernd Edlinger wrote: >>> On 08/20/18 15:19, Richard Biener wrote: > On Mon, 20 Aug 2018, Bernd Edlinger wrote: >

Re: [PATCH] Add -Wabsolute-value

2018-08-24 Thread Joseph Myers
On Fri, 24 Aug 2018, Martin Jambor wrote: > +/* Assuming we have encountered a call to a probably wrong kind of abs, > issue a > + warning. LOC is the location of the call, FNKIND is a string > characterizing > + the class of the used abs function, FNDEC is the actual function > declaratio

Re: [PATCH][0/4][RFC] RPO style value-numbering

2018-08-24 Thread Richard Biener
On Wed, 1 Aug 2018, Richard Biener wrote: > > This rewrites the value-numbering algorithm used for FRE and PRE from > SSA SCC based to RPO based, thus switching from an algorithm that > handles SSA SCCs optimistically to one that handles CFG SCCs > optimistically. > > The main motivation for th

Re: [PATCH RFC] add generic expansion for MULT_HIGHPART_EXP

2018-08-24 Thread Pekka Jääskeläinen
Hi, On Mon, Aug 20, 2018 at 1:46 PM Alexander Monakov wrote: > > So - how difficult is it to fix BRIG to not use MULT_HIGHPART_EXPR if > > not supported? > > Pekka, can you comment? I think you have fallback paths for vector types > only at the moment? I think it involves pretty much moving the

Re: [PATCH] Add -Wabsolute-value

2018-08-24 Thread Martin Jambor
Hi On Wed, Aug 15 2018, Eric Gallager wrote: > On 8/14/18, Joseph Myers wrote: >> On Tue, 14 Aug 2018, Martin Jambor wrote: >> >>> when you try compiling a call to function abs and provide an unsigned >>> int in the argument in C++, you will get an error about ambiguous >>> overload. In C howeve

Re: [PATCH][debug] Add -gdescriptive-dies

2018-08-24 Thread Richard Biener
On Wed, 22 Aug 2018, Tom de Vries wrote: > [ was: Re: [PATCH][debug] Add -gforce-named-dies ] > > On 08/22/2018 11:46 AM, Tom de Vries wrote: > > On 08/22/2018 08:56 AM, Tom de Vries wrote: > >> This is an undocumented developer-only option, because using this option > >> may > >> change behavio

[PATCH] (PR86989)

2018-08-24 Thread Segher Boessenkool
There currently is nothing that prevents replacing the TOC_REGISTER in a TOCREL unspec with something else, like a pseudo, or a memory ref. This of course does not work. Fix that. Tested on powerpc64-linux {-m32,-m64}; committing. Segher 2018-08-24 Segher Boessenkool PR target/869

Re: lightweight class to wide int ranges in VRP and friends

2018-08-24 Thread Richard Biener
On Wed, Aug 15, 2018 at 7:31 PM Aldy Hernandez wrote: > > I kept seeing the same patterns over and over in all this re-factoring: > > 1. extract value_range constants into pairs of wide ints > > 2. mimic symbolics as [-MIN, +MAX] (most of the time :)) > > 3. perform some wide int operation on the

Re: [PATCH 0/6] improve handling of char arrays with missing nul (PR 86552, 86711, 86714)

2018-08-24 Thread Richard Biener
On Wed, Aug 15, 2018 at 5:42 PM Jeff Law wrote: > > On 08/15/2018 08:47 AM, Martin Sebor wrote: > > On 08/15/2018 12:02 AM, Jeff Law wrote: > >> On 08/13/2018 03:23 PM, Martin Sebor wrote: > >>> To make reviewing the changes easier I've split up the patch > >>> into a series: > >> [ ... ] > >> I'm

Re: [PATCH] treat -Wxxx-larger-than=HWI_MAX special (PR 86631)

2018-08-24 Thread Richard Biener
On Fri, Aug 24, 2018 at 12:35 AM Martin Sebor wrote: > > On 08/23/2018 07:18 AM, Richard Biener wrote: > > On Thu, Aug 23, 2018 at 12:20 AM Martin Sebor wrote: > >> > >> On 08/20/2018 06:14 AM, Richard Biener wrote: > >>> On Thu, Jul 26, 2018 at 10:52 PM Martin Sebor wrote: > > On 07/2

Re: [PATCH] print full STRING_CST in Gimple dumps (PR 87052)

2018-08-24 Thread Richard Biener
On Thu, Aug 23, 2018 at 5:13 PM Martin Sebor wrote: > > On 08/23/2018 08:07 AM, Michael Matz wrote: > > Hi, > > > > On Thu, 23 Aug 2018, Richard Biener wrote: > > > Can you write a not \0 terminated string literal in C? > >>> > >>> Yes: char a[2] = "12"; > >> > >> I thought they are fully def

Re: VRP: make range_includes_zero_p handle value_ranges

2018-08-24 Thread Richard Biener
On Thu, Aug 23, 2018 at 4:50 PM Aldy Hernandez wrote: > > > > On 08/23/2018 05:59 AM, Richard Biener wrote: > > On Wed, Aug 22, 2018 at 11:31 AM Aldy Hernandez wrote: > >> > >> > >> > >> On 08/21/2018 05:46 AM, Richard Biener wrote: > >>> On Wed, Aug 15, 2018 at 3:33 AM Aldy Hernandez wrote: > >

Re: [PATCH] DWARF: Call set_indirect_string on DW_MACINFO_start_file

2018-08-24 Thread Richard Biener
On Thu, Aug 23, 2018 at 4:38 PM H.J. Lu wrote: > > On Thu, Aug 23, 2018 at 5:56 AM, Richard Biener > wrote: > > On Wed, Aug 22, 2018 at 9:36 PM H.J. Lu wrote: > >> > >> Since -gsplit-dwarf -g3 will output filename as indirect string, call > >> set_indirect_string on DW_MACINFO_start_file for -gs

[PR 87073] [committed] fix go bootstrap

2018-08-24 Thread Aldy Hernandez
I have no idea how this passed bootstrap and tests in other languages. The problem here is that wide_int_binop is overflowing on TRUNC_DIV_EXPR and a range in Go. This is causing us to use wmin/wmax uninitialized. Serves me right for all my whining about Ada yesterday. I think the VRP chang