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

2018-08-30 Thread Martin Sebor
On 08/30/2018 04:15 PM, Jeff Law wrote: On 08/13/2018 09:21 PM, Martin Sebor wrote: [PATCH 2/6] detect unterminated const arrays in strlen calls (PR 86552) The attached changes implement the detection of past-the-end reads by strlen due to unterminated arguments. gcc-86552-2.diff PR

[testsuite] Add dg-require-fileio to some libstdc++ wchar_t tests

2018-08-30 Thread Sandra Loosemore
One of the simulators we use for testing nios2-elf builds doesn't include full semihosted fileio support. (IIRC it can do I/O to the console and open and close files, but doesn't support fseek, stat/fstat, unlink, etc). There are a bunch of libstdc++ wchar_t/$test.cc test cases that fail on

Re: [PATCH, Darwin, config] Arrange for configure to detect "otool".

2018-08-30 Thread Mike Stump
On Aug 30, 2018, at 8:45 AM, Iain Sandoe wrote: > > Currently, we fail to detect some Darwin assembler capabilities because the > configure tests rely on a BINUTILS objdump, which isn’t generally available > on Darwin. > > Darwin uses a tool called "otool" to provide information about objects,

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-30 Thread Jeff Law
On 08/30/2018 10:58 AM, Richard Henderson wrote: > On 08/28/2018 07:13 AM, Jeff Law wrote: >> Please consider using function descriptors rather than trampolines. >> This allows you to make the stack non-executable at all times which is >> good from a security standpoint. The downside is the

Re: [PATCH] tree-vrp: add "const" qualifier to various value_range pointers

2018-08-30 Thread Jeff Law
On 08/30/2018 04:24 PM, David Malcolm wrote: > Adding "const" to these indicates to both humans and the compiler in which > direction information is intended to flow. For example, compare: > extract_range_from_binary_expr_1, which takes two vr and modifies a third > with: >

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

2018-08-30 Thread Jeff Law
On 08/13/2018 03:29 PM, Martin Sebor wrote: > The attached changes implement the detection of past-the-end reads > by strncpy due to unterminated arguments and excessive bounds. > > > gcc-86552-6.diff > > > PR tree-optimization/86552 - missing warning for reading past the end of > non-string

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

2018-08-30 Thread Jeff Law
On 08/13/2018 03:28 PM, Martin Sebor wrote: > The attached changes implement the detection of past-the-end reads > by stpcpy due to unterminated arguments. > > > gcc-86552-5.diff > > > PR tree-optimization/86552 - missing warning for reading past the end of > non-string arrays > >

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

2018-08-30 Thread Jeff Law
On 08/13/2018 03:28 PM, Martin Sebor wrote: > The attached changes implement the detection of past-the-end reads > by the sprintf family of functions due to unterminated arguments to > %s directives. > > gcc-86552-4.diff > > > PR tree-optimization/86552 - missing warning for reading past the

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

2018-08-30 Thread Jeff Law
On 08/13/2018 03:27 PM, Martin Sebor wrote: > The attached changes implement the detection of past-the-end reads > by strcpy due to unterminated arguments. > > gcc-86552-3.diff > > > PR tree-optimization/86552 - missing warning for reading past the end of > non-string arrays > >

Re: [PATCH] C++: highlight bad argument in some users of print_z_candidates (more PR c++/85110)

2018-08-30 Thread Jason Merrill
On Thu, Aug 23, 2018 at 2:08 PM, David Malcolm wrote: > This is a followup to: > > "[PATCH] C++: underline param in print_conversion_rejection (more PR > c++/85110)" > https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01480.html > > to highlight the pertinent argument in a unmatched function

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

2018-08-30 Thread Jeff Law
On 08/13/2018 09:21 PM, Martin Sebor wrote: > [PATCH 2/6] detect unterminated const arrays in strlen calls (PR 86552) > > The attached changes implement the detection of past-the-end reads > by strlen due to unterminated arguments. > > gcc-86552-2.diff > > > PR tree-optimization/86552 -

[PATCH] tree-vrp: add "const" qualifier to various value_range pointers

2018-08-30 Thread David Malcolm
Adding "const" to these indicates to both humans and the compiler in which direction information is intended to flow. For example, compare: extract_range_from_binary_expr_1, which takes two vr and modifies a third with: ranges_from_anti_range, which takes one and modifies two others.

[testsuite, committed] Make dependence on -fdelete-null-pointer-checks explicit in more test cases

2018-08-30 Thread Sandra Loosemore
As discussed here https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01510.html a few years ago Altera requested that GCC default to -fno-delete-null-pointer-checks on nios2-elf target. As part that change, I added an explicit -fdelete-null-pointer-checks option to a bunch of test cases that

Re: PATCH for c++/87068, missing diagnostic with fallthrough statement

2018-08-30 Thread Jakub Jelinek
On Thu, Aug 30, 2018 at 05:17:03PM -0400, Marek Polacek wrote: > > 2018-08-23 Marek Polacek > > > > PR c++/87068 > > * gimplify.c (expand_FALLTHROUGH_r): If IFN_FALLTHROUGH was found > > at the end of a seq, save its location to walk_stmt_info. > > (expand_FALLTHROUGH): Warn if

Re: PATCH for c++/87068, missing diagnostic with fallthrough statement

2018-08-30 Thread Marek Polacek
Ping. On Thu, Aug 23, 2018 at 04:38:03PM -0400, Marek Polacek wrote: > The C++ standard says that [[fallthrough]]; at the end of a switch statement > is ill-formed: > > Currently we do check that the statement after a fallthrough statement is > a

Re: Workaround for building trunk with GCC 4.4.7

2018-08-30 Thread Jose E. Marchesi
The patch is OK - thanks for noticing. Committed as below. Thanks! Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 263981) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,10 @@ +2018-08-30 Jose E. Marchesi +

Re: [PATCH, OpenACC] Support C++ "this" in OpenACC directives (PR66053)

2018-08-30 Thread Jason Merrill
On Thu, Aug 30, 2018 at 3:31 PM, Julian Brown wrote: > This patch (by Joseph) allows "this" to be used in OpenACC directives, > following -- IIUC -- the behaviour of other compilers. The standard (as > of OpenACC 2.5) does not appear to have explicit language either > permitting or forbidding

Re: [patch] [match.pd]: missing optimization on comparison

2018-08-30 Thread Marc Glisse
Hello, why not put these right next to the one that does x==0 & y==0? INTEGRALS_SIGN_PREC_MATCH: the name doesn't really match the semantics. You may need to add a bunch of :s. I always wonder if such transformations should be blocked until a late gimple pass so we keep the more natural form

Re: Make safe_iterator inline friends

2018-08-30 Thread François Dumont
Thanks for all those explanations. It helped me to find the solution. So here is the final patch with all operators inline friends. Tested under Linux x86_64.     * include/debug/safe_iterator.h     (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>::_Self):     New.    

[PATCH, OpenACC] Support C++ "this" in OpenACC directives (PR66053)

2018-08-30 Thread Julian Brown
This patch (by Joseph) allows "this" to be used in OpenACC directives, following -- IIUC -- the behaviour of other compilers. The standard (as of OpenACC 2.5) does not appear to have explicit language either permitting or forbidding such usage. Joseph's original commentary is in the bug report

Re: [PATCH] C++: Fix-it hints for '.' vs '->' (PR c++/84898)

2018-08-30 Thread Jason Merrill
On Wed, Aug 29, 2018 at 4:37 PM, David Malcolm wrote: > This patch implements fix-it hints for "." vs "->" mismatches in the C++ > frontend, for the places where the relevant location information is > readily available. > > Successfully bootstrapped on x86_64-pc-linux-gnu; > adds 39 PASS results

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-08-30 Thread Martin Sebor
On 08/30/2018 11:22 AM, Richard Biener wrote: On August 30, 2018 6:54:21 PM GMT+02:00, Martin Sebor wrote: On 08/30/2018 02:35 AM, Richard Biener wrote: On Thu, Aug 30, 2018 at 2:12 AM Martin Sebor wrote: The attached patch adds code to work harder to determine whether the destination of

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-08-30 Thread Richard Biener
On August 30, 2018 6:54:21 PM GMT+02:00, Martin Sebor wrote: >On 08/30/2018 02:35 AM, Richard Biener wrote: >> On Thu, Aug 30, 2018 at 2:12 AM Martin Sebor >wrote: >>> >>> The attached patch adds code to work harder to determine whether >>> the destination of an assignment involving MEM_REF is

Re: PING^1 [PATCH] DWARF: Relax SUPPORTS_STACK_ALIGNMENT with !crtl->stack_realign_tried

2018-08-30 Thread Jason Merrill
On Wed, Aug 29, 2018 at 7:31 PM, H.J. Lu wrote: > On Wed, Aug 29, 2018 at 3:37 PM, Jason Merrill wrote: >> On Wed, Aug 29, 2018 at 5:43 PM, H.J. Lu wrote: >>> On Wed, Aug 29, 2018 at 2:17 PM, Jason Merrill wrote: On Wed, Aug 29, 2018 at 3:38 PM, H.J. Lu wrote: > On Wed, Aug 29, 2018

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-30 Thread Richard Henderson
On 08/28/2018 07:13 AM, Jeff Law wrote: > Please consider using function descriptors rather than trampolines. > This allows you to make the stack non-executable at all times which is > good from a security standpoint. The downside is the indirect calling > mechanism has to change slightly to

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-08-30 Thread Martin Sebor
On 08/30/2018 02:35 AM, Richard Biener wrote: On Thu, Aug 30, 2018 at 2:12 AM Martin Sebor wrote: The attached patch adds code to work harder to determine whether the destination of an assignment involving MEM_REF is the same as the destination of a prior strncpy call. The included test case

Re: Add new warning flag "warn_prio_ctor_dtor"

2018-08-30 Thread Joseph Myers
On Thu, 30 Aug 2018, Vinay Kumar wrote: > +Warn if a priority from 0 to 100 is used for constructor or destructor. > +The use of constructor and destructor attributes allow you to assign a > +priority to the constructor/destructor to control its order of execution > +before main() is called or

Re: [PATCH 3/3] or1k: gcc: initial support for openrisc

2018-08-30 Thread Joseph Myers
On Thu, 30 Aug 2018, Stafford Horne wrote: > On Wed, Aug 29, 2018 at 04:38:45PM -0600, Jeff Law wrote: > > ps. Any plans for glibc? How complete is the qemu support? I'm having > > reasonable success building little chroot filesystems, then using qemu > > to do bootstrap testing within those

Re: [PATCH 1/1] Move AESNI generation to Skylake and Goldmont

2018-08-30 Thread H.J. Lu
On Wed, Aug 29, 2018 at 11:56 PM, Uros Bizjak wrote: > On Thu, Aug 30, 2018 at 7:14 AM, Thiago Macieira > wrote: >> The instruction set first appeared with Westmere, but not all processors >> in that and the next few generations have the instructions. According to >> Wikipedia[1], the first

Re: [GCC][PATCH v2][Aarch64] Exploiting BFXIL when OR-ing two AND-operations with appropriate bitmasks

2018-08-30 Thread Sam Tebbs
On 08/28/2018 11:53 PM, James Greenhalgh wrote: Hm, I'm not very sure about the naming here; "left consecutive" isn't a common phrase to denote the mask you're looking for (exact_log2 (-i) != -1 if I'm reading right), and is misleading 0x is 'left consecutive' too, just with zeroes

Re: [PATCH, Darwin, config] Arrange for configure to detect "otool".

2018-08-30 Thread Rainer Orth
Hi Iain, > Currently, we fail to detect some Darwin assembler capabilities because the > configure tests rely on a BINUTILS objdump, which isn’t generally available > on Darwin. > > Darwin uses a tool called "otool" to provide information about objects, and we > should be able to extend or adapt

Re: Fix even more merging PIC and PIE options

2018-08-30 Thread Jan Hubicka
> On Fri, 10 Aug 2018, Jan Hubicka wrote: > > > Hi, > > this patch should fix merging of PIC and PIE options so we always resort > > to the least common denominator of the object files compiled (i.e. > > linking together -fpic and -fPIE will result in -fpie binary). > > Note that we also use

[PATCH, Darwin, config] Arrange for configure to detect "otool".

2018-08-30 Thread Iain Sandoe
Currently, we fail to detect some Darwin assembler capabilities because the configure tests rely on a BINUTILS objdump, which isn’t generally available on Darwin. Darwin uses a tool called "otool" to provide information about objects, and we should be able to extend or adapt config tests to use

[libcpp] fix some line map comments

2018-08-30 Thread Nathan Sidwell
A couple of cleanups for comments. committing to trunk. nathan -- Nathan Sidwell 2018-08-30 Nathan Sidwell * include/line-map.h (enum lc_reason): Comment each member separately. (struct line_maps): Fix reallocator comment. Index: include/line-map.h

Re: [PR c++/87137] GCC-8 Fix

2018-08-30 Thread JonY
On 08/30/2018 11:59 AM, Nathan Sidwell wrote: > On 08/29/2018 11:06 PM, Liu Hao wrote: > >> It is strictly an ABI break but I doubt whether code in real world >> that got broken by this bug ever exists. Usually when people expect >> consecutive bitfields to be packed into a single word they

[PATCH] Avoid undefined shifts in ceil2 operations

2018-08-30 Thread Jonathan Wakely
For values where the result cannot be represented the shift width would be equal to the width of the type, which is undefined. Perform two well-defined shifts instead of one possible undefined shift. * include/bits/hashtable_policy.h (__clp2): Fix calculation for LLP64 targets

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

2018-08-30 Thread Jason Merrill
On Thu, Aug 30, 2018 at 2:55 AM, Bernd Edlinger wrote: > 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

Add new warning flag "warn_prio_ctor_dtor"

2018-08-30 Thread Vinay Kumar
Hi, This patch adds a warning flag that nullifies warnings when priorities in constructor or destructor are assigned from 0 - 100. There are some low-level constructors that are part of the implementation. In such cases, the option will be useful to avoid unnecessary warnings. Please review the

[PATCH, OpenACC] Properly handle wait clause with no arguments

2018-08-30 Thread Chung-Lin Tang
Hi, this patch properly handles OpenACC 'wait' clauses without arguments, making it an equivalent of "wait all". (current trunk basically discards and ignores such argument-less wait clauses) This adds additional handling in the pack/unpack of the wait argument across the compiler/libgomp

Re: C++ PATCH/RFC for c++/87109, wrong overload with ref-qualifiers

2018-08-30 Thread Jason Merrill
On Wed, Aug 29, 2018 at 8:03 PM, Marek Polacek wrote: > I've now gotten to the point where I question the validity of this PR, so it's > probably a good time to stop and ask for some advice. > > As discussed in , we > choose the wrong

Re: [PATCH] Fix PR87147

2018-08-30 Thread Richard Biener
On Thu, 30 Aug 2018, Richard Biener wrote: > > The following fixes an issue I introduced late with some re-org > introducing BB_EXCUTABLE ... > > O1-bootstrap and regtest running on x86_64-unknown-linux-gnu. The following is what I applied. O1-bootstrapped and tested on

[PATCH] Fix undefined references seen with mingw-w64

2018-08-30 Thread Jonathan Wakely
* config/abi/pre/gnu.ver: Add missing exports for mingw. Tested x86_64-linux and x86_64-w64-mingw32, committed to trunk. commit 8a70204f5e3cfcea0e2a0d5404bf547bc8da7bcc Author: Jonathan Wakely Date: Thu Aug 30 13:25:36 2018 +0100 Fix undefined references seen with mingw-w64

Re: [PATCH AArch64]Fix test failure for pr84682-2.c

2018-08-30 Thread Richard Sandiford
Joey Ye writes: > Hi Bin & Richard, > > It is not as simple as keeping the assertion, which still fails even > with the change in reorg.c. The testing result is as following: > > I. With Bin's patch version 2 (removing the assertion in aarch64.c and > adding the check in reorg.c): pr84682-2.c

[PATCH] Fix __gnu_cxx::_Pointer_adapter for long long arithmetic

2018-08-30 Thread Jonathan Wakely
* include/ext/pointer.h (_Pointer_adapter): Define operators for pointer arithmetic using long long offsets. * testsuite/ext/ext_pointer/1.cc: Test pointer arithmetic using long long values. Tested x86_64-linux, committed to trunk. commit

Re: [PATCH 1/2] configure.ac: use 'suppress' instead of 'don't'

2018-08-30 Thread Richard Sandiford
Alexander Monakov writes: > Hello, > > If patch 2/2 is approved, I'd like to apply this alongside with that. > > Use positive form ("suppress") rather than negative ("don't") to explain > the option, because using the option results in passing -Wno-format > rather than not passing -Wformat. I

Re: [PR c++/87137] GCC-8 Fix

2018-08-30 Thread Nathan Sidwell
On 08/29/2018 11:06 PM, Liu Hao wrote: It is strictly an ABI break but I doubt whether code in real world that got broken by this bug ever exists. Usually when people expect consecutive bitfields to be packed into a single word they wouldn't put irrelevant declarations between them. You're

Re: [PATCH AArch64]Fix test failure for pr84682-2.c

2018-08-30 Thread Joey Ye
typo: s/reorg.c/recog.c/g On Thu, Aug 30, 2018 at 11:20 AM Joey Ye wrote: > > Hi Bin & Richard, > > It is not as simple as keeping the assertion, which still fails even > with the change in reorg.c. The testing result is as following: > > I. With Bin's patch version 2 (removing the assertion in

Re: [6/6] Link imm uses for pattern stmts

2018-08-30 Thread Richard Biener
On Wed, Aug 29, 2018 at 11:25 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, Aug 28, 2018 at 1:25 PM Richard Sandiford > > wrote: > >> > >> One of the warts of the vectoriser IR is that it doesn't link SSA name > >> uses for pattern statements, leading to complicated special

Re: [patch] [match.pd]: missing optimization on comparison

2018-08-30 Thread Kai Tietz
Sorry, I attached a patch file with an minor bug. Kai Hi, this patch implements some folding patterns about integral comparison of condition. I noticed the lack of folding in gcc by comparing gcc with llvm result. These optimization are interesting as they are helping to linearize some

Re: [PATCH AArch64]Fix test failure for pr84682-2.c

2018-08-30 Thread Joey Ye
Hi Bin & Richard, It is not as simple as keeping the assertion, which still fails even with the change in reorg.c. The testing result is as following: I. With Bin's patch version 2 (removing the assertion in aarch64.c and adding the check in reorg.c): pr84682-2.c passes II. With Richard's

Re: [PATCH] Fix expand_mult_const (PR middle-end/87138)

2018-08-30 Thread Richard Biener
On Thu, 30 Aug 2018, Jakub Jelinek wrote: > On Thu, Aug 30, 2018 at 09:57:48AM +0200, Richard Biener wrote: > > > > Ugh. I wonder if we should add a > > > > > > > > rtx gen_int_mode (poly_uint64 c, machine_mode mode) > > > > > > > > and assert that the topmost bit is not set if

Re: Reduce memory usage of sreal

2018-08-30 Thread Richard Biener
On Wed, 29 Aug 2018, Jan Hubicka wrote: > Hi, > this patch reduces memory use of sreal by converting m_sig from int64_t to > int32_t. This requires me to reduce SREAL_PART_BITS from 32 to 31 so there is > space for sign. There is comment "SREAL_PART_BITS has to be an even number." > but I found

[patch] [match.pd]: missing optimization on comparison

2018-08-30 Thread Kai Tietz
i, this patch implements some folding patterns about integral comparison of condition. I noticed the lack of folding in gcc by comparing gcc with llvm result. These optimization are interesting as they are helping to linearize some conditional expressions. The following patterns are

Re: [PATCH] Fix expand_mult_const (PR middle-end/87138)

2018-08-30 Thread Jakub Jelinek
On Thu, Aug 30, 2018 at 09:57:48AM +0200, Richard Biener wrote: > > > Ugh. I wonder if we should add a > > > > > > rtx gen_int_mode (poly_uint64 c, machine_mode mode) > > > > > > and assert that the topmost bit is not set if GET_MODE_PRECISION (mode) > > > > 64? > > > > > > But I guess

Re: [GCC][PATCH] Enable underflow check in canonicalize_comparison. (PR86995)

2018-08-30 Thread Vlad Lazar
On 29/08/18 17:55, Jakub Jelinek wrote: On Wed, Aug 29, 2018 at 05:49:02PM +0100, Vlad Lazar wrote: On 29/08/18 17:43, Jakub Jelinek wrote: On Wed, Aug 29, 2018 at 05:39:26PM +0100, Vlad Lazar wrote: r263591 introduced the following regressions on multiple platforms: +FAIL:

Re: [PATCH] Optimise sqrt reciprocal multiplications

2018-08-30 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01496.html Thanks, Kyrill On 23/08/18 18:09, Kyrill Tkachov wrote: Hi Richard, On 23/08/18 11:13, Richard Sandiford wrote: Kyrill Tkachov writes: Hi all, This patch aims to optimise sequences involving uses of 1.0 / sqrt (a) under

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

2018-08-30 Thread Richard Biener
On Thu, Aug 30, 2018 at 2:27 AM Jeff Law wrote: > > On 08/28/2018 06:12 PM, Martin Sebor wrote: > >>> Sadly, dstbase is the PARM_DECL for d. That's where things are going > >>> "wrong". Not sure why you're getting the PARM_DECL in that case. I'd > >>> debug get_addr_base_and_unit_offset to

Re: [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-08-30 Thread Richard Biener
On Thu, Aug 30, 2018 at 2:12 AM Martin Sebor wrote: > > The attached patch adds code to work harder to determine whether > the destination of an assignment involving MEM_REF is the same > as the destination of a prior strncpy call. The included test > case demonstrates when this situation comes

Re: Workaround for building trunk with GCC 4.4.7

2018-08-30 Thread Richard Biener
On Wed, Aug 29, 2018 at 6:45 PM Jose E. Marchesi wrote: > > > Hi people! > > I found this compilation problem while building today's trunk with GCC > 4.4.7 [1] in a RHEL 6.9 derivative in sparc64: > > g++ -fno-PIE -c -g -DIN_GCC -fno-exceptions -fno-rtti > -fasynchronous-unwind-tables -W

Re: [PATCH RFC] add generic expansion for MULT_HIGHPART_EXP

2018-08-30 Thread Richard Biener
On Wed, Aug 29, 2018 at 4:00 PM Alexander Monakov wrote: > > On Tue, 28 Aug 2018, Richard Biener wrote: > > I think that if we want to support MULT_HIGHPART generally then we need > > to support it for all modes - what's your plan for 32bit targets here? This > > means providing libgcc fallback

Re: [PING 5][PATCH] [v4][aarch64] Avoid tag collisions for loads falkor

2018-08-30 Thread Siddhesh Poyarekar
On Wednesday 29 August 2018 10:05 PM, James Greenhalgh wrote: Sorry that this took me so long to get to. > > The code is outstanding quality, a textbook example of writing an > analysis/optimization pass using modern GCC frameworks and data > structures! If you ever find the opportunity, I bet

Re: [PATCH] Fix expand_mult_const (PR middle-end/87138)

2018-08-30 Thread Richard Biener
On Thu, 30 Aug 2018, Jakub Jelinek wrote: > On Thu, Aug 30, 2018 at 09:31:01AM +0200, Richard Biener wrote: > > > The following testcase is miscompiled, because expand_mult_const adds an > > > incorrect REG_EQUAL note to a temporary pseudo. In the testcase, we > > > do an unsigned __int128

[PATCH] Fix PR87147

2018-08-30 Thread Richard Biener
The following fixes an issue I introduced late with some re-org introducing BB_EXCUTABLE ... O1-bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2018-08-30 Richard Biener PR tree-optimization/87147 * tree-ssa-sccvn.c (do_rpo_vn): Properly mark blocks

Re: [PATCH] Fix expand_mult_const (PR middle-end/87138)

2018-08-30 Thread Jakub Jelinek
On Thu, Aug 30, 2018 at 09:31:01AM +0200, Richard Biener wrote: > > The following testcase is miscompiled, because expand_mult_const adds an > > incorrect REG_EQUAL note to a temporary pseudo. In the testcase, we > > do an unsigned __int128 multiplication of a variable by > > 0x7fff,

Re: VRP: abstract out POINTER_TYPE_P handling

2018-08-30 Thread Aldy Hernandez
On 08/29/2018 12:32 PM, David Malcolm wrote: On Wed, 2018-08-29 at 06:54 -0400, Aldy Hernandez wrote: Never say never. Just when I thought I was done... It looks like I need the special casing we do for pointer types in extract_range_from_binary_expr_1. The code is simple enough that we

Re: [PATCH] Fix expand_mult_const (PR middle-end/87138)

2018-08-30 Thread Richard Biener
On Thu, 30 Aug 2018, Jakub Jelinek wrote: > Hi! > > The following testcase is miscompiled, because expand_mult_const adds an > incorrect REG_EQUAL note to a temporary pseudo. In the testcase, we > do an unsigned __int128 multiplication of a variable by > 0x7fff, which is determined

[PATCH] Fix expand_mult_const (PR middle-end/87138)

2018-08-30 Thread Jakub Jelinek
Hi! The following testcase is miscompiled, because expand_mult_const adds an incorrect REG_EQUAL note to a temporary pseudo. In the testcase, we do an unsigned __int128 multiplication of a variable by 0x7fff, which is determined to be best performed as shift left by 63

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 check to avoid folding on empty char

Re: [PATCH 1/1] Move AESNI generation to Skylake and Goldmont

2018-08-30 Thread Uros Bizjak
On Thu, Aug 30, 2018 at 7:14 AM, Thiago Macieira wrote: > The instruction set first appeared with Westmere, but not all processors > in that and the next few generations have the instructions. According to > Wikipedia[1], the first generation in which all SKUs have AES > instructions are Skylake

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

2018-08-30 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 overlength >> STRING_CST never have a longer