Re: [PATCH] Make strlen range computations more conservative

2018-08-20 Thread Bernd Edlinger
On 08/21/18 04:43, Martin Sebor wrote: >> I must say that I don't like the return value optimization >> on the sprintf pass, because it uses knowledge of the glibc implementation >> of sprintf to do it's job (mind the 4K buffer limit). > > Yet again, you don't know what you're talking about.  The

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-20 Thread Bernd Edlinger
On 08/21/18 01:23, Martin Sebor wrote: > On 08/20/2018 04:17 PM, Jeff Law wrote: >> On 08/18/2018 11:38 AM, Martin Sebor wrote: >>> On 08/17/2018 09:32 PM, Jeff Law wrote: >>>> On 08/17/2018 02:17 PM, Martin Sebor wrote: >>>>> On 08/17/2018 12:44 PM, B

Re: [PATCH] Make strlen range computations more conservative

2018-08-21 Thread Bernd Edlinger
On 08/22/18 00:25, Jeff Law wrote: > On 08/21/2018 02:43 AM, Richard Biener wrote: >> On Mon, 20 Aug 2018, Bernd Edlinger wrote: > [ snip. ] > >>> Yes, I found some peanuts on my way. >>> >>> For instance this fix for PR middle-end/86121 survives boot

Re: [PATCH] Make strlen range computations more conservative

2018-08-21 Thread Bernd Edlinger
On 08/22/18 00:43, Jeff Law wrote: > [ I'm still digesting, but saw something in this that ought to be broken > out... ] > > On 08/19/2018 09:55 AM, Bernd Edlinger wrote: >> diff -Npur gcc/tree-ssa-dse.c gcc/tree-ssa-dse.c >> --- gcc/tree-ssa-dse.c 2018-0

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-21 Thread Bernd Edlinger
On 08/21/18 10:59, Richard Biener wrote: > On Tue, 21 Aug 2018, Bernd Edlinger wrote: > >> gcc -S -O2 -Wall -Wformat-overflow -ftrack-macro-expansion=0 -fshort-wchar >> builtin-sprintf-warn-20.c >> builtin-sprintf-warn-20.c: In function 'test': >> built

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

2018-08-21 Thread Bernd Edlinger
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: >>> >>>> On 08/20/18 13:01, Richard Biener wrote: >>>>> On

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-22 Thread Bernd Edlinger
On 08/22/18 09:26, Richard Biener wrote: > On Wed, 22 Aug 2018, Bernd Edlinger wrote: > >> On 08/21/18 10:59, Richard Biener wrote: >>> On Tue, 21 Aug 2018, Bernd Edlinger wrote: >>> >>>> gcc -S -O2 -Wall -Wformat-overflow -ftrack-macro-expansion=0 -fs

Re: [PATCH] Make strlen range computations more conservative

2018-08-22 Thread Bernd Edlinger
(xfail or remove). Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. gcc: 2018-08-21 Bernd Edlinger * common.opt: Add new optimization option -fassume-zero-terminated-char-arrays. * gimple-fold.h

Re: [PATCH] Call braced_list_to_string after array size is fixed

2018-08-22 Thread Bernd Edlinger
x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. On 08/17/18 14:01, Bernd Edlinger wrote: > Hi, > > Yes I know Martin will see this as a capital offense, but to my excuse I must > say > it only happened in self defense :-) > > As my other patch series depends on ST

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

2018-08-22 Thread Bernd Edlinger
86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. On 08/17/18 15:53, Bernd Edlinger wrote: > On 08/17/18 15:38, Richard Biener wrote: >> On Fri, 17 Aug 2018, Bernd Edlinger wrote: >> >>> On 08/17/18 14:19, Richard Biener wrote: >>>> On Fri, 17 Aug 2018,

[PATCH] Improve checks in c_strlen (PR 87053)

2018-08-22 Thread Bernd Edlinger
of my PR 86711/86714 patch. Is it OK for trunk? Thanks Bernd. gcc: 2018-08-22 Bernd Edlinger PR middle-end/87053 * builtins.c (c_strlen): Improve range checks. testsuite: 2018-08-22 Bernd Edlinger PR middle-end/87053 * gcc.c-torture/execute/pr87053.c: New test. diff -Npur gcc

Re: [PATCH] Make strlen range computations more conservative

2018-08-22 Thread Bernd Edlinger
On 08/22/18 18:05, Martin Sebor wrote: > On 08/21/2018 10:05 PM, Bernd Edlinger wrote: >> On 08/22/18 00:25, Jeff Law wrote: >>> On 08/21/2018 02:43 AM, Richard Biener wrote: >>>> On Mon, 20 Aug 2018, Bernd Edlinger wrote: >>> [ snip. ] >&g

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

2018-08-22 Thread Bernd Edlinger
On 08/22/18 22:54, Martin Sebor wrote: > On 08/22/2018 08:27 AM, Bernd Edlinger wrote: >> Hi, >> >> >> this is an updated version of my STRING_CSTs checking in varasm.c >> patch. >> >> It tries to answer the questions that were raised in th GO string li

Re: [PATCH] Make strlen range computations more conservative

2018-08-22 Thread Bernd Edlinger
On 08/23/18 00:34, Jeff Law wrote: > On 08/22/2018 11:22 AM, Bernd Edlinger wrote: >> On 08/22/18 18:05, Martin Sebor wrote: >>> On 08/21/2018 10:05 PM, Bernd Edlinger wrote: >>>> On 08/22/18 00:25, Jeff Law wrote: >>>>> On 08/21/2018 02:43 AM, Ric

Re: [PATCH] Make strlen range computations more conservative

2018-08-22 Thread Bernd Edlinger
On 08/23/18 00:57, Martin Sebor wrote: > On 08/22/2018 04:34 PM, Jeff Law wrote: >> On 08/22/2018 11:22 AM, Bernd Edlinger wrote: >>> On 08/22/18 18:05, Martin Sebor wrote: >>>> On 08/21/2018 10:05 PM, Bernd Edlinger wrote: >>>>> On 08/22/18 00:25,

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-22 Thread Bernd Edlinger
On 08/23/18 00:50, Jeff Law wrote: > On 08/22/2018 02:14 AM, Richard Biener wrote: >> On Wed, 22 Aug 2018, Bernd Edlinger wrote: >> >>> On 08/22/18 09:26, Richard Biener wrote: >>>> On Wed, 22 Aug 2018, Bernd Edlinger wrote: >>>> >>>>>

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-22 Thread Bernd Edlinger
On 08/23/18 01:36, Jeff Law wrote: > On 08/22/2018 05:22 PM, Bernd Edlinger wrote: >> On 08/23/18 00:50, Jeff Law wrote: >>> On 08/22/2018 02:14 AM, Richard Biener wrote: >>>> On Wed, 22 Aug 2018, Bernd Edlinger wrote: >>>> >>>>> On 08/22/1

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-23 Thread Bernd Edlinger
On 08/23/18 00:50, Jeff Law wrote: > On 08/22/2018 02:14 AM, Richard Biener wrote: >> On Wed, 22 Aug 2018, Bernd Edlinger wrote: >> >>> On 08/22/18 09:26, Richard Biener wrote: >>>> On Wed, 22 Aug 2018, Bernd Edlinger wrote: >>>> >>>>>

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

2018-08-23 Thread Bernd Edlinger
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. >> >> Unfortunately this patch alone is not sufficient to

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-23 Thread Bernd Edlinger
On 08/22/18 10:14, Richard Biener wrote: > On Wed, 22 Aug 2018, Bernd Edlinger wrote: > >> On 08/22/18 09:26, Richard Biener wrote: >>> On Wed, 22 Aug 2018, Bernd Edlinger wrote: >>> >>>> On 08/21/18 10:59, Richard Biener wrote: >>>>> On Tu

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-23 Thread Bernd Edlinger
at a re-based patch is here: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01005.html and if you want, you can split that patch in two parts: first: 86711 fix: 2018-08-17 Bernd Edlinger PR middle-end/86711 * expr.c (string_constant): Don't return truncated string literals.

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:

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, >>>

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

[PATCH] Use complete_array_type on flexible array member initializers

2018-08-24 Thread Bernd Edlinger
-linux-gnu. Is it OK for trunk? Thanks Bernd. gcc: 2018-08-24 Bernd Edlinger * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of the init value. c-family: 2018-08-24 Bernd Edlinger * c-common.c (complete_flexible_array_elts): New helper function. * c-common.h

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. >> >>>

[PATCHv2] Call braced_list_to_string after array size is fixed

2018-08-24 Thread Bernd Edlinger
. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. c-family: 2018-08-24 Bernd Edlinger * c-common.c (braced_list_to_string): Remove eval parameter. Add some more checks. Always create zero-terminated STRING_CST. * c-common.h (braced_list_to_string

[PATCHv2] Handle overlength strings in the C FE

2018-08-24 Thread Bernd Edlinger
x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2018-08-01 Bernd Edlinger * c-typeck.c (digest_init): Shorten overlength strings. Index: gcc/c/c-typeck.c === --- gcc/c/c-typeck.c (revision 263807) +++ gcc/c/c-typeck.c

[PATCHv2] Handle overlength strings in C++ FE

2018-08-24 Thread Bernd Edlinger
-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2018-08-01 Bernd Edlinger * typeck2.c (digest_init_r): Fix overlength strings. * vtable-class-hierarchy.c (build_key_buffer_arg): Make string literal NUL terminated. Index: gcc/cp/typeck2.c

[PATCHv2] Handle overlength string literals in the fortan FE

2018-08-24 Thread Bernd Edlinger
have all sting constants internally zero-terminated is dropped. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2018-08-01 Bernd Edlinger * trans-array.c (gfc_conv_array_initializer): Remove excess precision from overlength string initializers. Index

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

2018-08-24 Thread Bernd Edlinger
Bernd. 2018-08-24 Bernd Edlinger * varasm.c (compare_constant): Compare type size of STRING_CSTs. (get_constant_size): Don't make STRING_CSTs larger than they are. (check_string_literal): New check function for STRING_CSTs. (output_constant): Use it. Index: gcc/var

[PATCH] Adjust string_constant to new STRING_CST semantics

2018-08-24 Thread Bernd Edlinger
86711/86714). Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. gcc: 2018-08-24 Bernd Edlinger * expr.c (string_constant): Adjust function comment. Remove bogus check for zero termination. testsuite: 2018-08-24 Bernd Edlinger PR middle-end/8671

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

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 n

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

2018-08-25 Thread Bernd Edlinger
On 08/25/18 19:32, Jeff Law wrote: > On 08/25/2018 12:32 AM, Bernd Edlinger wrote: >> 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

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

2018-08-25 Thread Bernd Edlinger
On 08/25/18 21:02, Jeff Law wrote: > On 08/25/2018 12:36 PM, Bernd Edlinger wrote: > >>>>> >>>> >>>> Well, ya call it "layer one patch over the other" >>>> I call it "incremental improvements". >>> It is

Re: [PATCHv2] Call braced_list_to_string after array size is fixed

2018-08-26 Thread Bernd Edlinger
On 08/26/18 05:34, Jeff Law wrote: > On 08/24/2018 01:52 PM, Bernd Edlinger wrote: >> 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: &g

Re: [PATCH] Use complete_array_type on flexible array member initializers

2018-08-26 Thread Bernd Edlinger
On 08/26/18 07:36, Jeff Law wrote: > On 08/24/2018 07:13 AM, Bernd Edlinger wrote: >> Hi! >> >> >> This patch prevents init values of STRING_CST and braced >> array initializers to reach the middle-end with incomplete >> type. >> >> This will allo

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-26 Thread Bernd Edlinger
On 08/26/18 07:44, Jeff Law wrote: > On 08/21/2018 10:35 AM, Martin Sebor wrote: >> On 08/21/2018 09:59 AM, Jeff Law wrote: >>> On 08/21/2018 09:57 AM, Martin Sebor wrote: >>>> On 08/21/2018 02:59 AM, Richard Biener wrote: >>>>> On Tue, 21 Aug 2018,

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-26 Thread Bernd Edlinger
On 08/26/18 07:47, Jeff Law wrote: > On 08/21/2018 11:49 AM, Martin Sebor wrote: >> On 08/21/2018 09:44 AM, Joseph Myers wrote: >>> On Tue, 21 Aug 2018, Martin Sebor wrote: >>> Sure, but the only valid argument to %ls is wchar_t*.  Passing it something else is undefined. >>> >>> Well, (wc

Re: [PATCH] Make strlen range computations more conservative

2018-08-26 Thread Bernd Edlinger
looks_like_a_char_array_without_typecast_p for warnings, but use GIMPLE semantics otherwise. * tree-ssa-strlen.c (maybe_set_strlen_range): Use GIMPLE semantics. (get_min_string_length): Avoid not NUL terminated string literals. testsuite: 2018-08-26 Bernd Edlinger *

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

2018-08-26 Thread Bernd Edlinger
On 08/25/18 22:42, Martin Sebor wrote: > On 08/25/2018 01:32 PM, Bernd Edlinger wrote: >> On 08/25/18 21:02, Jeff Law wrote: >>> On 08/25/2018 12:36 PM, Bernd Edlinger wrote: >>> >>>>>>> >>>>>> >>>>>> Well, ya

[PING] [PATCH] Fix not properly nul-terminated string constants in JIT

2018-08-26 Thread Bernd Edlinger
Ping... This is just plain wrong, independent of any STRING_CST semantic issues. The original patch (retested on current trunk) is here: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00370.html On 08/05/18 18:59, Bernd Edlinger wrote: > Hi! > > > My other patch with adds a

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-28 Thread Bernd Edlinger
On 08/28/18 04:55, Jeff Law wrote: > On 08/23/2018 08:48 AM, Bernd Edlinger wrote: >> On 08/23/18 16:24, Jeff Law wrote: >>>> >>>> Yes, and which one was the earlier, more controversial patch from me? >>> >>> https://gcc.gnu.org/ml/gcc-patches/2

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen

2018-08-28 Thread Bernd Edlinger
On 08/28/18 11:25, Bernd Edlinger wrote: > On 08/28/18 04:55, Jeff Law wrote: >> On 08/23/2018 08:48 AM, Bernd Edlinger wrote: >>> On 08/23/18 16:24, Jeff Law wrote: >>>>> >>>>> Yes, and which one was the earlier, more controversial patch from me? &

Re: [PATCHv2] Handle overlength strings in C++ FE

2018-08-29 Thread Bernd Edlinger
On 08/30/18 00:17, Jason Merrill wrote: > On Fri, Aug 24, 2018 at 4:02 PM, Bernd Edlinger > wrote: >> Hi! >> >> >> This is an alternative approach to handle overlength strings in the C++ FE. >> >> The difference to the previous version is that ov

Re: [PATCHv2] Call braced_list_to_string after array size is fixed

2018-08-30 Thread Bernd Edlinger
On 08/30/18 06:34, Jason Merrill wrote: > On 08/24/2018 03:52 PM, Bernd Edlinger wrote: >> 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 che

Re: [PATCHv2] Call braced_list_to_string after array size is fixed

2018-08-30 Thread Bernd Edlinger
On 08/30/18 09:07, Bernd Edlinger wrote: > On 08/30/18 06:34, Jason Merrill wrote: >> On 08/24/2018 03:52 PM, Bernd Edlinger wrote: >>> this updated patch fixes one regression with current trunk due >>> to a new test case.  Sorry for the confusion. >>> >&

[PATCH] Adjust c_getstr/c_strlen to new STRING_CST semantic

2018-08-31 Thread Bernd Edlinger
sa-forwprop.c can handle, and should make this work in fortran again. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2018-08-30 Bernd Edlinger * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs correctly. * fold-const.c (c_getstr): Fix fun

Re: [PATCHv2] Call braced_list_to_string after array size is fixed

2018-08-31 Thread Bernd Edlinger
On 08/31/18 18:45, Jeff Law wrote: > On 08/26/2018 01:45 AM, Bernd Edlinger wrote: > >>>> cp: >>>> 2018-08-24 Bernd Edlinger >>>> >>>>* decl.c (eval_check_narrowing): Remove. >>>>(check_initializer): Move call to braced_

Re: [PATCH] Adjust c_getstr/c_strlen to new STRING_CST semantic

2018-08-31 Thread Bernd Edlinger
On 08/31/18 16:42, Jeff Law wrote: > On 08/31/2018 01:08 AM, Bernd Edlinger wrote: >> Hi, >> >> >> when re-testing the new STRING_CST semantic patch here: >> https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01569.html >> >> I noticed that the (my

Re: [PATCH] Use complete_array_type on flexible array member initializers

2018-09-03 Thread Bernd Edlinger
On 09/03/2018 05:43, Jeff Law wrote: > On 08/26/2018 02:52 AM, Bernd Edlinger wrote: >> On 08/26/18 07:36, Jeff Law wrote: >>> On 08/24/2018 07:13 AM, Bernd Edlinger wrote: >>>> Hi! >>>> >>>> >>> This patch prevents init values of S

Re: [PATCHv2] Handle overlength string literals in the fortan FE

2018-09-04 Thread Bernd Edlinger
On 03/09/2018, 21:25 Janne Blomqvist wrote: > On Fri, Aug 24, 2018 at 11:06 PM Bernd Edlinger > wrote: > >> Hi! >> >> >> This is an alternative approach to handle overlength strings in the >> Fortran FE. >> > > Hi, > > can you explai

Re: [PATCH try 2 resend] [i386] Remove warnings for ignoring -mcall-ms2sysv-xlogues.

2017-06-13 Thread Bernd Edlinger
On 06/11/17 22:35, Daniel Santos wrote: > I appear to have forgotten to cc gcc-patches, sorry about that. > > There are currently three cases where we issue a warning when disabling > -mcall-ms2sysv-xlogues for a function, but I never added a proper > warning, so there's no mechanism for disabli

[PING**5] [PATCH, ARM] correctly encode the CC reg data flow

2017-06-14 Thread Bernd Edlinger
Ping... On 06/01/17 18:00, Bernd Edlinger wrote: > Ping... > > On 05/12/17 18:49, Bernd Edlinger wrote: >> Ping... >> >> On 04/29/17 19:21, Bernd Edlinger wrote: >>> Ping... >>> >>> On 04/20/17 20:11, Bernd Edlinger wrote: >>>>

[PING**5] [PATCH, ARM] Further improve stack usage on sha512 (PR 77308)

2017-06-14 Thread Bernd Edlinger
Ping... On 06/01/17 18:01, Bernd Edlinger wrote: > Ping... > > On 05/12/17 18:49, Bernd Edlinger wrote: >> Ping... >> >> On 04/29/17 19:45, Bernd Edlinger wrote: >>> Ping... >>> >>> I attached a rebased version since there was a merge conf

[PING**4] [PATCH, ARM] Further improve stack usage in sha512, part 2 (PR 77308)

2017-06-14 Thread Bernd Edlinger
Ping... for this patch: https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01568.html On 06/01/17 18:02, Bernd Edlinger wrote: > Ping... > > On 05/12/17 18:50, Bernd Edlinger wrote: >> Ping... >> >> On 04/29/17 19:52, Bernd Edlinger wrote: >>> Ping... >>

[PING**3][PATCH][ PR rtl-optimization/79286] Drop may_trap_p exception to testing dominance in update_equiv_regs

2017-06-14 Thread Bernd Edlinger
Ping... I attached the patch again for your reference. Is it OK for trunk? Thanks Bernd. On 06/01/17 17:59, Bernd Edlinger wrote: > Ping... > > On 05/12/17 18:48, Bernd Edlinger wrote: >> Ping... >> >> On 04/29/17 09:06, Bernd Edlinger wrote: >>> On 04/28/

[PING] [PATCH] Add a warning for invalid function casts

2017-11-08 Thread Bernd Edlinger
Ping... for the C++ part of this patch: https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00559.html Thanks Bernd. > On 10/10/17 00:30, Bernd Edlinger wrote: >> On 10/09/17 20:34, Martin Sebor wrote: >>> On 10/09/2017 11:50 AM, Bernd Edlinger wrote: >>>> On 10/0

[PING**2] [PATCH] Add a warning for invalid function casts

2017-11-15 Thread Bernd Edlinger
Ping... On 11/08/17 17:55, Bernd Edlinger wrote: > Ping... > > for the C++ part of this patch: > > https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00559.html > > > Thanks > Bernd. > >> On 10/10/17 00:30, Bernd Edlinger wrote: >>> On 10/09/17 20:34,

[PATCHv2] Add a warning for invalid function casts

2017-11-30 Thread Bernd Edlinger
On 11/29/17 22:57, Jason Merrill wrote: > On 10/09/2017 06:30 PM, Bernd Edlinger wrote: >> +/* Heuristic check if two parameter types can be considered >> ABI-equivalent.  */ >> + >> +static bool >> +cxx_abi_equiv_type_p (tree t1, tree t2) > > This nam

Re: [PATCHv2] Add a warning for invalid function casts

2017-11-30 Thread Bernd Edlinger
On 11/30/17 16:45, Jason Merrill wrote: > On Thu, Nov 30, 2017 at 10:14 AM, Bernd Edlinger > wrote: >> On 11/29/17 22:57, Jason Merrill wrote: >>> On 10/09/2017 06:30 PM, Bernd Edlinger wrote: > >>>> + if (INTEGRAL_TYPE_P (t1) >>>> + &

Re: [PATCHv2] Add a warning for invalid function casts

2017-11-30 Thread Bernd Edlinger
On 11/30/17 18:29, Jason Merrill wrote: > On Thu, Nov 30, 2017 at 11:07 AM, Bernd Edlinger > wrote: >> On 11/30/17 16:45, Jason Merrill wrote: >>> On Thu, Nov 30, 2017 at 10:14 AM, Bernd Edlinger >>> wrote: >>>> On 11/29/17 22:57, Jason Merrill wrote: &g

Re: [PATCHv2] Add a warning for invalid function casts

2017-11-30 Thread Bernd Edlinger
On 11/30/17 19:05, Jason Merrill wrote: > On Thu, Nov 30, 2017 at 12:55 PM, Bernd Edlinger > wrote: >> On 11/30/17 18:29, Jason Merrill wrote: >>> On Thu, Nov 30, 2017 at 11:07 AM, Bernd Edlinger >>> wrote: >>>> On 11/30/17 16:45, Jason Merrill wro

[PATCHv3] Add a warning for invalid function casts

2017-12-01 Thread Bernd Edlinger
. Is it OK for trunk? Thanks Bernd. gcc: 2017-10-06 Bernd Edlinger * doc/invoke.texi: Document -Wcast-function-type. * recog.h (stored_funcptr): Change signature. * tree-dump.c (dump_node): Avoid warning. * typed-splay-tree.h (typed_splay_tree): Avoid warning

Re: [PATCHv3] Add a warning for invalid function casts

2017-12-07 Thread Bernd Edlinger
On 12/06/17 23:35, Jason Merrill wrote: > On Fri, Dec 1, 2017 at 7:42 AM, Bernd Edlinger > wrote: >> this version of the patch improves the heuristic check to take the >> target hook into account, to handle cases correctly when both or only >> one parameter is _not_

Re: [PATCHv3] Add a warning for invalid function casts

2017-12-14 Thread Bernd Edlinger
On 12/07/17 21:48, Bernd Edlinger wrote: > On 12/06/17 23:35, Jason Merrill wrote: >> On Fri, Dec 1, 2017 at 7:42 AM, Bernd Edlinger >> wrote: >>> this version of the patch improves the heuristic check to take the >>> target hook into account, to handle cases co

[PATCH] Avoid excessive function type casts with splay-trees

2017-12-15 Thread Bernd Edlinger
IMHO not really safe to do... The attached patch adds a context argument to the callback functions but keeps the existing interface as far as possible. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd.include: 2017-12-15 Bernd Edlinger * splay

Re: [PATCH] Avoid excessive function type casts with splay-trees

2017-12-15 Thread Bernd Edlinger
On 12/15/17 11:51, Jakub Jelinek wrote: > On Fri, Dec 15, 2017 at 10:44:54AM +0000, Bernd Edlinger wrote: >> when working on the -Wcast-function-type patch I noticed some rather >> ugly and non-portable function type casts that are necessary to accomplish >> some actua

Re: PATCH to fix -Wrestrict ICE (PR middle-end/83463)

2017-12-18 Thread Bernd Edlinger
Hi Martin, > In all cases all the information necessary to detect and diagnose > or even avoid the problem is available. In fact, one might argue > that optimizing such calls (expanding them inline) would be > preferable to doing nothing and allowing the undefined behavior > to cause a bug at run

Re: [PATCH] Avoid excessive function type casts with splay-trees

2017-12-21 Thread Bernd Edlinger
Ping? On 12/15/17 19:59, Bernd Edlinger wrote: > On 12/15/17 11:51, Jakub Jelinek wrote: >> On Fri, Dec 15, 2017 at 10:44:54AM +0000, Bernd Edlinger wrote: >>> when working on the -Wcast-function-type patch I noticed some rather >>> ugly and non-portable function type

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-07 Thread Bernd Edlinger
Hi Richard, I wonder how to use this builtin correctly. Frankly it sounds like way too complicated. Do you expect we need to use this stuff on every array access now, or is that just a theoretical thing that can only happen with jave byte code interpreters? If I assume there is an array of int,

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-08 Thread Bernd Edlinger
I thought about your new builtin again, and I wonder if something like that might work as well? cat despec.s .arch armv7-a .eabi_attribute 28, 1 .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_at

Re: [PING] [PATCH] Avoid excessive function type casts with splay-trees

2018-05-26 Thread Bernd Edlinger
On 05/17/18 16:37, Bernd Edlinger wrote: > On 05/17/18 15:39, Richard Biener wrote: >> On Thu, May 17, 2018 at 3:21 PM Bernd Edlinger >> >> wrote: >> >>> Ping... >> >> So this makes all traditional users go through the indirect >> sp

Re: [PING] [PATCH] Avoid excessive function type casts with splay-trees

2018-05-28 Thread Bernd Edlinger
On 05/28/18 11:19, Richard Biener wrote: > On Sat, May 26, 2018 at 10:19 AM Bernd Edlinger > wrote: > > > >> On 05/17/18 16:37, Bernd Edlinger wrote: >>> On 05/17/18 15:39, Richard Biener wrote: >>>> On Thu, May 17, 2018 at 3:21 PM Bernd

[PATCH] Avoid excessive function type casts with splay-trees part 2

2018-06-08 Thread Bernd Edlinger
which is only for completeness and test coverage, but not (yet) used in a productive way. Bootstrapped and reg-tested on x86_64-linux-gnu. Is it OK for trunk? Thanks Bernd. 2018-06-08 Bernd Edlinger * typed-splay-tree.h (typed_splay_tree::remove): New function

Re: [PATCH] Avoid excessive function type casts with splay-trees part 2

2018-06-08 Thread Bernd Edlinger
On 06/08/18 16:28, David Malcolm wrote: > On Fri, 2018-06-08 at 14:03 +0000, Bernd Edlinger wrote: >> Hi! >> >> >> This patch converts the splay-tree internals into a template, and >> makes >> the typed_splay_tree template really type-safe. Previousl

Re: [PATCH] Avoid excessive function type casts with splay-trees part 2

2018-06-14 Thread Bernd Edlinger
On 06/14/18 15:43, Richard Biener wrote: > On Fri, 8 Jun 2018, Bernd Edlinger wrote: > >> Hi! >> >> >> This patch converts the splay-tree internals into a template, and makes >> the typed_splay_tree template really type-safe. Previously everything >> w

Re: [PATCH] Avoid excessive function type casts with splay-trees part 2

2018-06-15 Thread Bernd Edlinger
On 06/15/18 09:07, Richard Biener wrote: > On Thu, 14 Jun 2018, Bernd Edlinger wrote: > >> On 06/14/18 15:43, Richard Biener wrote: >>> On Fri, 8 Jun 2018, Bernd Edlinger wrote: >>> >>>> Hi! >>>> >>>> >>>> Th

[PATCH] [ADA] Make install-gnatlib use the correct ranlib for cross-builds

2018-06-30 Thread Bernd Edlinger
Hi, there is a minor glitch in the make install for TARGET!=HOST cross-builds, which affects only Ada AFAICT. That is "make install" tries to use the wrong ranlib command here: cd rts; for file in *.a;do \ /usr/bin/install -c -m 644 $file /home/ed/gnu/arm-linux-gnueabihf-linux64/lib/gcc/arm

Re: [RFC PATCH] diagnose built-in declarations without prototype (PR 83656)

2018-06-30 Thread Bernd Edlinger
Hi Martin, really nice work. Just one minor nit: >--- a/gcc/doc/invoke.texi >+++ b/gcc/doc/invoke.texi >@@ -6568,8 +6568,13 @@ attributes. > @item -Wno-builtin-declaration-mismatch > @opindex Wno-builtin-declaration-mismatch > @opindex Wbuiltin-declaration-mismatch >-Warn if a built-in fu

[PATCH] Remove -Wabi from libstdc++ build options

2018-06-30 Thread Bernd Edlinger
ppens many times while building libstdc++, and as the warning explains, it is good for nothing, so this patch removes it. Bootstrapped and reg-tested on x86_64-pc-linux-gnu. Is it OK for trunk? Thanks Bernd. 2018-06-30 Bernd Edlinger * acinclude.m4 (WARN_FLAGS): Remove -Wabi. * conf

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Bernd Edlinger
Richard Earnshaw wrote: > Let me give an example, we use the generic code expansion if we > encounter the builtin when generating code for Thumb on pre-ARMv7 > devices. We don't have instructions in 'thumb1' to guard against > speculation and we really want to warn users that they've done this

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Bernd Edlinger
On 01/09/18 18:50, Richard Earnshaw (lists) wrote: > On 09/01/18 17:36, Bernd Edlinger wrote: >> Richard Earnshaw wrote: >>  > Let me give an example, we use the generic code expansion if we >>  > encounter the builtin when generating code for Thumb on pre-ARMv7 >

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Bernd Edlinger
On 01/09/18 19:08, Richard Earnshaw (lists) wrote: > > But we probably don't need to. > > int x __attribute__((mode(TI))) = 0; > > $ arm-none-elf-gcc timode.c > > /tmp/ti.c:1:1: error: unable to emulate ‘TI’ > int x __attribute__((mode(TI))) = 0; > ^~~ > Yes, good, then you should proba

Re: [PATCH 0/3] Add __builtin_load_no_speculate

2018-01-09 Thread Bernd Edlinger
On 01/09/18 18:50, Richard Earnshaw (lists) wrote: > On 09/01/18 17:36, Bernd Edlinger wrote: >> Richard Earnshaw wrote: >>  > Let me give an example, we use the generic code expansion if we >>  > encounter the builtin when generating code for Thumb on pre-ARMv7 >

Re: [PATCH 3/3] [arm] Implement support for the de-speculation intrinsic

2018-01-17 Thread Bernd Edlinger
Hi, + if (mode == TImode || TARGET_THUMB1) +return default_speculation_safe_load (mode, result, mem, lower_bound, + upper_bound, cmpptr, warn); TImode is impossible to happen right, so you could as well let that one run into the gcc_unreachable below,

Re: [PATCH 1/3] [builtins] Generic support for __builtin_speculation_safe_load()

2018-01-17 Thread Bernd Edlinger
Hi, + return targetm.speculation_safe_load (mode, target, mem, lower, upper, + cmpptr, true); So portable programming will use this builtin when available, but for the majority of the targets the default will be wrong, For instance why should a PDP port be t

[PATCH] fix for diagnostic/84034

2018-01-25 Thread Bernd Edlinger
ignored and thus the following line overwrites everything from the last source line. The following patch fixes the visual glitch by handling a CR '\r' like a TAB '\t' character. Bootstrapped and reg-rested in x86_64-pc-linux-gnu. OK for trunk? Thanks Bernd. 2018-01-25 B

[wwwdocs] gcc-8/changes.html additions

2018-04-04 Thread Bernd Edlinger
Hi, this adds a few gcc command line options to gcc-8/changes.html which I added for gcc-8. I have validated as XHTML 1.0 Transitional. Is it OK for wwwdocs? Thanks Bernd. ? patch-changes.diff Index: htdocs/gcc-8/changes.html ===

Re: [wwwdocs] gcc-8/changes.html additions

2018-04-04 Thread Bernd Edlinger
On 04/04/18 22:11, Martin Sebor wrote: > On 04/04/2018 12:24 PM, Bernd Edlinger wrote: >> Hi, >> >> this adds a few gcc command line options to gcc-8/changes.html which >> I added for gcc-8. > > Just a couple of suggestions: > > 1) Use to render sizeof i

Re: [wwwdocs] gcc-8/changes.html additions

2018-04-07 Thread Bernd Edlinger
On 04/07/18 23:00, Gerald Pfeifer wrote: > On Wed, 4 Apr 2018, Bernd Edlinger wrote: >> Is it OK for wwwdocs? > > Yes, except... > > + -Wsizeof-pointer-div warns for suspicious divisions > + of two sizeof expressions that divide the pointer size by > + the

Re: [wwwdocs] Document libstdc++ changes in GCC 8

2018-04-10 Thread Bernd Edlinger
> Let me know if I've forgotten anything we should document. Not your fault, but -Wclass-memaccess comes rather often and is not in the changes. Bernd.

Re: [PATCH] Use complete_array_type on flexible array member initializers

2018-09-06 Thread Bernd Edlinger
On 09/04/18 16:30, Jeff Law wrote: > On 09/03/2018 06:35 AM, Bernd Edlinger wrote: > [ Big snip, dropping lots of context ] > >>>>> >>>> >>>> No I don't think so, because at that time BRACE_ENCLOSED_INITIALIZER_P >>>>

Re: [PATCHv2] Handle overlength string literals in the fortan FE

2018-09-06 Thread Bernd Edlinger
On 09/05/18 20:16, Janne Blomqvist wrote: > On Tue, Sep 4, 2018 at 10:05 AM Bernd Edlinger <mailto:bernd.edlin...@hotmail.de>> wrote: > > On 03/09/2018, 21:25 Janne Blomqvist wrote: > > On Fri, Aug 24, 2018 at 11:06 PM Bernd Edlinger > mailto:bernd.edlin...@

Re: [PATCH] Use complete_array_type on flexible array member initializers

2018-09-06 Thread Bernd Edlinger
On 09/06/18 17:43, Jeff Law wrote: > On 09/06/2018 05:05 AM, Bernd Edlinger wrote: >> On 09/04/18 16:30, Jeff Law wrote: >>> On 09/03/2018 06:35 AM, Bernd Edlinger wrote: >>> [ Big snip, dropping lots of context ] >>> >>>>>> No I don't

Re: [PATCH] Use complete_array_type on flexible array member initializers

2018-09-06 Thread Bernd Edlinger
On 09/07/18 00:26, Jeff Law wrote: > On 09/06/2018 04:16 PM, Jeff Law wrote: >> On 09/06/2018 04:01 PM, Jeff Law wrote: >>> On 09/06/2018 11:12 AM, Bernd Edlinger wrote: >>> >>>>> >>>> >>>> Ah, thanks a lot. >>>> >>

Re: [PATCH] Use complete_array_type on flexible array member initializers

2018-09-07 Thread Bernd Edlinger
On 09/07/18 08:51, Bernd Edlinger wrote: > On 09/07/18 00:26, Jeff Law wrote: >> On 09/06/2018 04:16 PM, Jeff Law wrote: >>> On 09/06/2018 04:01 PM, Jeff Law wrote: >>>> On 09/06/2018 11:12 AM, Bernd Edlinger wrote: >>>> >>>>>> >>&

Re: [PATCH] Use complete_array_type on flexible array member initializers

2018-09-07 Thread Bernd Edlinger
On 09/07/18 15:36, Bernd Edlinger wrote: > On 09/07/18 08:51, Bernd Edlinger wrote: >> On 09/07/18 00:26, Jeff Law wrote: >>> On 09/06/2018 04:16 PM, Jeff Law wrote: >>>> On 09/06/2018 04:01 PM, Jeff Law wrote: >>>>> On 09/06/2018 11:12 AM, Bernd E

Re: [PATCH 2/6] detect unterminated const arrays in strlen calls (PR 86552)

2018-09-08 Thread Bernd Edlinger
Hi, > -fold_builtin_strlen (location_t loc, tree type, tree arg) > +fold_builtin_strlen (location_t loc, tree fndecl, tree type, tree arg) > { >if (!validate_arg (arg, POINTER_TYPE)) > return NULL_TREE; >else > { > - tree len = c_strlen (arg, 0); > - > + tree nonstr =

<    1   2   3   4   5   6   7   8   9   10   >