Re: Fix even more merging PIC and PIE options

2018-08-14 Thread Martin Liška
On 08/10/2018 04:33 PM, 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 information abou

[PATCH] S/390: Remove literal pool chunkification loop

2018-08-14 Thread Ilya Leoshkevich
Since there is no branch splitting anymore, the loop is no longer necessary: pool chunkification can be done in one step. gcc/ChangeLog: 2018-08-13 Ilya Leoshkevich * config/s390/s390.c (s390_reorg): remove loop --- gcc/config/s390/s390.c | 69 ++--

[PATCH] lra: fix FPE when dumping

2018-08-14 Thread Ilya Leoshkevich
The following S/390 code struct {} b; void c() { __asm__("la 0,%0\n" "la 1,%1\n" : : "m" (b), "m" (b) : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r12", "r14"); } results in int

Re: [Patch, Fortran] PR 86116: Ambiguous generic interface not recognised

2018-08-14 Thread Janus Weil
ping! Am So., 5. Aug. 2018 um 15:23 Uhr schrieb Janus Weil : > > Hi all, > > the attached patch fixes PR 86116 by splitting up the function > 'compare_type' into two variants: One that is used for checking > generic interfaces and operators (keeping the old name), and one that > is used for check

Re: [libgomp, testsuite] Support parallel testing in libgomp (PR libgomp/66005)

2018-08-14 Thread Martin Liška
On 05/08/2015 10:40 AM, Thomas Schwinge wrote: > Hi! > > On Thu, 7 May 2015 13:39:40 +0200, Jakub Jelinek wrote: >> On Thu, May 07, 2015 at 01:26:57PM +0200, Rainer Orth wrote: >>> As reported in the PR, with the addition of all those OpenACC tests, >>> libgomp make check times have skyrocketed s

[PATCH] Backport of RISC-V support for libffi go closures

2018-08-14 Thread Andreas Schwab
This is a backport of commit 4cb776bc80 in the libffi repository. Tested on riscv64-suse-linux . Andreas. Backport of RISC-V support for libffi go closures * src/riscv/ffi.c (ffi_call_go, ffi_prep_go_closure): New

[PATCH 3/3] Improve switch code emission for a balanced tree (PR tree-optimization/86847).

2018-08-14 Thread marxin
This is the most complex patch. It follows original implementation and does following improvements that were part of original code: a) for a node with both children (that don't have children) and only single case values handled: emit series of 3 compares and jump to default b) for a node with only

[PATCH 0/3] Improvements to switch expansion code

2018-08-14 Thread marxin
Hi. With my rapid simplification of balanced tree emission we regressed on number of tests needed (PR 86847). Apart from that profile info was missing (INV) for jump tables and bit tests. That's fixed in another 2 patches. I'm explaining details of the patches in corresponding emails. Patch can b

[PATCH 1/3] Fix probabilities for jump table (PR tree-optimization/86702).

2018-08-14 Thread marxin
The patch set even probability to jump tables based on number of cases which are handled on each edge. gcc/ChangeLog: 2018-08-06 Martin Liska PR tree-optimization/86702 * tree-switch-conversion.c (jump_table_cluster::emit): Make probabilities even for values in jump ta

[PATCH 2/3] Fix probability for bit-tests.

2018-08-14 Thread marxin
The patch set even probability to bit test based on number of cases which are handled on each edge. gcc/ChangeLog: 2018-08-06 Martin Liska * tree-switch-conversion.c (bit_test_cluster::find_bit_tests): Add new argument to bit_test_cluster constructor. (bit_test_cluster

[PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-14 Thread Martin Liška
Hi. The patch adds more usages of the new macro. I hope it improves readability of code. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin gcc/ChangeLog: 2018-08-10 Martin Liska * tree.h (DECL_BUILT_IN_P): Add also check

Re: [arm-8-branch] Add Linaro version string and macros

2018-08-14 Thread Ramana Radhakrishnan
On Fri, Aug 10, 2018 at 5:00 PM, Yvan Roux wrote: > On Fri, 10 Aug 2018 at 17:01, Ramana Radhakrishnan > wrote: >> >> On Fri, Aug 10, 2018 at 3:35 PM, Yvan Roux wrote: >> > On Fri, 10 Aug 2018 at 14:31, Yvan Roux wrote: >> >> >> >> On Fri, 10 Aug 2018 at 13:45, Ramana Radhakrishnan >> >> wrote

Re: Two fixes for pretty-print.c for mingw-w64

2018-08-14 Thread JonY
On 08/14/2018 05:55 AM, Liu Hao wrote: > 在 2018/8/14 13:54, Liu Hao 写道: >> The two patches attached have addressed two issues in the ANSI escape >> sequence translator I sent before.  Please review, and consider >> backporting these to gcc-8-branch. >> >> >> >> > > And here are SVN changelogs for

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

2018-08-14 Thread Bernd Edlinger
Hi, this patch is a follow-up to my patch here: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01800.html Since most calls of c_strlen and get_range_strlen expect a string length in bytes of a zero-terminated string, there is a need for a new parameter eltsize, which is per default 1, but can be u

Re: [PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-14 Thread Bernd Edlinger
On 08/13/18 16:27, Martin Sebor wrote: > As I said below, the patch for PR 86552, 86711, 86714 that > was first posted on July 19 fixes both of these issues and > also diagnoses calls with unterminated strings: > >   https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00155.html > Sorry, but you you

[PATCH] Fix PR19315.

2018-08-14 Thread Iain Sandoe
Hi, As noted in the PR, GCC C currently has an "undocumented extension" that silently makes zero-sized static objects into 'extern' as well as 'static’. The warning that would normally be emitted is suppressed without ‘-pedantic’. This means that they don't get allocated (appearing in the objec

[PATCH] Fix P81033 for FDEs in partitioned code.

2018-08-14 Thread Iain Sandoe
Hi, A more detailed explanation is in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033#c37 When function sub-sections are enabled, Darwin’s assembler needs the FDE local start label for each sub-section to follow a linker-visible one so that the FDE will be correctly associated with the code

Re: [PATCH] Rope iterators: don't retain pointers when copied

2018-08-14 Thread Jonathan Wakely
On 20/05/18 21:28 -0700, Jeremy Sawicki wrote: Rope iterators sometimes contain pointers to an internal buffer inside the iterator itself. When such an iterator is copied, the copy incorrectly retains pointers to the original. This patch takes the simple approach of not copying the cached infor

Re: [PATCH] libstdc++-v3: Have aligned_alloc() on Newlib

2018-08-14 Thread Szabolcs Nagy
On 13/08/18 19:57, Jonathan Wakely wrote: On 13/08/18 13:04 +0100, Jonathan Wakely wrote: On 13/08/18 12:55 +0100, Szabolcs Nagy wrote: On 09/08/18 10:08, Jonathan Wakely wrote: Yes please, on trunk and 7 and 8. It's better to use the standard aligned_alloc if available. but the newlib alig

[PATCH, Darwin, Obvious] Fix PR81685, by adding DWARF 5 section names.

2018-08-14 Thread Iain Sandoe
Hi I plan to apply this as obvious unless there are any comments in the next day or so. The ICE is caused by missing mach-o section names for the ones introduced for DWARF5. Where possible (i.e. they are currently defined), I’ve synced the Darwin names with the ones emitted by clang. thanks

[PATCH] [C] Warn when calculating abs(unsigned_value)

2018-08-14 Thread Martin Jambor
Hi, 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 however, it will pass without silently. The following patch adds a warning for these cases, because I think it is likely that such code does

[PATCH] PR libstdc++/85343 overload __throw_ios_failure to take errno

2018-08-14 Thread Jonathan Wakely
[ios::failure] p2: "When throwing ios_base::failure exceptions, implementations should provide values of ec that identify the specific reason for the failure." This adds a new overload of __throw_ios_failure that can be passed errno, to store error_code(errno, system_category()) in the exception

Re: [PATCH][GCC][AArch64] Limit movmem copies to TImode copies.

2018-08-14 Thread Sudakshina Das
Hi Tamar On 13/08/18 17:27, Tamar Christina wrote: Hi Thomas, Thanks for the review. I’ll correct the typo before committing if I have no other changes required by a maintainer. Regards, Tamar. I am not a maintainer but I would like to point out something in your patch. I think you test c

[PING 4][PATCH] [v4][aarch64] Avoid tag collisions for loads falkor

2018-08-14 Thread Siddhesh Poyarekar
Ping! On 07/24/2018 12:37 PM, Siddhesh Poyarekar wrote: Hi, This is a rewrite of the tag collision avoidance patch that Kugan had written as a machine reorg pass back in February. The falkor hardware prefetching system uses a combination of the source, destination and offset to decide which pr

[PATCH] PR libstdc++/86846 Alternative to pointer-width atomics

2018-08-14 Thread Jonathan Wakely
Define a class using std::mutex for when std::atomic cannot be used to implement the default memory resource. When std::mutex constructor is not constexpr the constant_init trick won't work, so just define a global and use init_priority for it. The compiler warns about using reserved priority, so

Re: [PATCH] convert braced initializers to strings (PR 71625)

2018-08-14 Thread James Greenhalgh
On Wed, Aug 08, 2018 at 07:17:07PM -0500, Martin Sebor wrote: > On 08/08/2018 05:08 AM, Jason Merrill wrote: > > On Wed, Aug 8, 2018 at 9:04 AM, Martin Sebor wrote: > >> On 08/07/2018 02:57 AM, Jason Merrill wrote: > >>> > >>> On Wed, Aug 1, 2018 at 12:49 AM, Martin Sebor wrote: > > On

[PATCH] Simplify overflow checks in duration literals

2018-08-14 Thread Jonathan Wakely
* include/std/chrono (__check_overflow): Simplify definition. (_Checked_integral_constant): Remove. Tested x86_64-linux, committed to trunk. commit c0dec9d05de4695136694f78f2f76e3c9f15b3f1 Author: Jonathan Wakely Date: Tue Aug 14 14:33:38 2018 +0100 Simplify overflow che

Re: [PATCH] Use getentropy() for seeding PRNG

2018-08-14 Thread Fritz Reese
On Mon, Aug 13, 2018 at 4:12 PM Janne Blomqvist wrote: > > On Mon, Aug 13, 2018 at 5:36 PM, Fritz Reese wrote: >> >> On Fri, Aug 3, 2018 at 9:19 AM Janne Blomqvist >> wrote: >> > >> > The getentropy function, found on Linux, OpenBSD, and recently also >> > FreeBSD, can be used to get random byte

Re: [PATCH] Simplify overflow checks in duration literals

2018-08-14 Thread Marek Polacek
On Tue, Aug 14, 2018 at 02:55:17PM +0100, Jonathan Wakely wrote: > * include/std/chrono (__check_overflow): Simplify definition. > (_Checked_integral_constant): Remove. > > Tested x86_64-linux, committed to trunk. > > > commit c0dec9d05de4695136694f78f2f76e3c9f15b3f1 > Author: Jonat

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

2018-08-14 Thread Martin Sebor
On 08/14/2018 04:25 AM, Bernd Edlinger wrote: Hi, this patch is a follow-up to my patch here: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01800.html As I said multiple times, this patch is redundant -- the issue is fixed by the solution I posted back in July: https://gcc.gnu.org/ml/gcc-pa

Re: [PATCH] Simplify overflow checks in duration literals

2018-08-14 Thread Jonathan Wakely
On 14/08/18 09:59 -0400, Marek Polacek wrote: On Tue, Aug 14, 2018 at 02:55:17PM +0100, Jonathan Wakely wrote: * include/std/chrono (__check_overflow): Simplify definition. (_Checked_integral_constant): Remove. Tested x86_64-linux, committed to trunk. commit c0dec9d05de4695

Re: [Patch, Fortran] PR 86116: Ambiguous generic interface not recognised

2018-08-14 Thread Fritz Reese
Looks OK to me. On Tue, Aug 14, 2018 at 4:12 AM Janus Weil wrote: > > ping! > > > Am So., 5. Aug. 2018 um 15:23 Uhr schrieb Janus Weil : > > > > Hi all, > > > > the attached patch fixes PR 86116 by splitting up the function > > 'compare_type' into two variants: One that is used for checking > > g

[PATCH] S/390: Remove UNSPEC_LTREL_BASE

2018-08-14 Thread Ilya Leoshkevich
It was needed only for g5/g6 machines, which are now gone. gcc/ChangeLog: 2018-08-14 Ilya Leoshkevich * config/s390/s390.c (s390_decompose_constant_pool_ref): Remove UNSPEC_LTREL_BASE check. (annotate_constant_pool_refs): Likewise. (find_constant_pool_ref): Lik

Re: [aarch64}: added variable issue rate feature for falkor

2018-08-14 Thread Kyrill Tkachov
Hi Kai, On 13/08/18 17:48, Kai Tietz wrote: I repost updated patch containing ChangeLog entry. Regards, Kai I think I understand what this patch does, please correct me if I'm wrong. You model the processors micro-ops and some A64 instructions use multiple micro-ops. This is what the falkor_

[PATCH][Middle-end]patch for fixing PR 86519

2018-08-14 Thread Qing Zhao
Hi, PR 86519:New test case gcc.dg/strcmpopt_6.c fails with its introduction in r262636. ***the root cause is: for the following call to memcmp: __builtin_memcmp (s->s, "a", 3); the specified length 3 is larger than the length of "a", it's clearly an out-of-bound access. This new testing case

Re: [PATCH] convert braced initializers to strings (PR 71625)

2018-08-14 Thread Martin Sebor
On 08/14/2018 07:27 AM, James Greenhalgh wrote: On Wed, Aug 08, 2018 at 07:17:07PM -0500, Martin Sebor wrote: On 08/08/2018 05:08 AM, Jason Merrill wrote: On Wed, Aug 8, 2018 at 9:04 AM, Martin Sebor wrote: On 08/07/2018 02:57 AM, Jason Merrill wrote: On Wed, Aug 1, 2018 at 12:49 AM, Martin

Re: [PATCH] Fix build with ISL 0.20

2018-08-14 Thread Matthias Klose
On 01.08.2018 09:13, Richard Biener wrote: > > The following fixes build with ISL 0.20, tested by building with > ISL 0.20 and 0.15 (the oldest supported ISL). > > Applied to trunk, will commit to the branches as well. that was committed to the 7 and 8 branches, but not the 6 branch. Now done as

Re: [PATCH] convert braced initializers to strings (PR 71625)

2018-08-14 Thread Martin Sebor
On 08/14/2018 09:08 AM, Martin Sebor wrote: On 08/14/2018 07:27 AM, James Greenhalgh wrote: On Wed, Aug 08, 2018 at 07:17:07PM -0500, Martin Sebor wrote: On 08/08/2018 05:08 AM, Jason Merrill wrote: On Wed, Aug 8, 2018 at 9:04 AM, Martin Sebor wrote: On 08/07/2018 02:57 AM, Jason Merrill wro

Re: [PATCH] Use more DECL_BUILT_IN_P macro.

2018-08-14 Thread Martin Sebor
On 08/14/2018 03:06 AM, Martin Liška wrote: Hi. The patch adds more usages of the new macro. I hope it improves readability of code. I think it does :) I see that most invocations of it in your patch are with BUILT_IN_NORMAL as the second argument. Is the argument implied by the last argumen

gcc-patches@gcc.gnu.org

2018-08-14 Thread Alexandre Oliva
I guess this was a cut&pasto. I caught it during code review. It doesn't seem to matter much: I haven't been able to get any codegen difference from this change, not in a bootstrap, not in test runs. I even put a gcc_unreachable() in case the test on rhs2 were to return false (which would never

Re: [RFC][PATCH][mid-end] Optimize immediate choice in comparisons.

2018-08-14 Thread Vlad Lazar
On 13/08/18 15:00, Richard Sandiford wrote: Vlad Lazar writes: diff --git a/gcc/expmed.h b/gcc/expmed.h index 2890d9c9bbd034f01030dd551d544bf73e73b784..86a32a643fdd0fc9f396bd2c7904244bd484df16 100644 --- a/gcc/expmed.h +++ b/gcc/expmed.h @@ -702,6 +702,10 @@ extern rtx emit_store_flag (rtx, e

[PATCH] avoid MEM_REF when looking for poor-man's flexible arrays (PR 86914)

2018-08-14 Thread Martin Sebor
Attached is a patch to avoid calling array_at_struct_end_p() with a MEM_REF argument. The function returns false even if the reference does point into such a flexible array member, as in: struct A { char i, a[1]; }; void f (struct A *p) { return strlen (p->a + 1); } This fix will li

Re: [Patch, Fortran] PR 86116: Ambiguous generic interface not recognised

2018-08-14 Thread Janus Weil
Am Di., 14. Aug. 2018 um 16:16 Uhr schrieb Fritz Reese : > > Looks OK to me. Thanks, Fritz. Committed as r263540. Since this PR is a regression, it should probably be backported to the release branches as well. However, I'll a wait a week or two with that, in order to check for possible problems

Re: [PATCH] Backport of RISC-V support for libffi go closures

2018-08-14 Thread Jim Wilson
On 08/14/2018 02:00 AM, Andreas Schwab wrote: Backport of RISC-V support for libffi go closures * src/riscv/ffi.c (ffi_call_go, ffi_prep_go_closure): New functions. (ffi_call_int): Renamed from ffi_call. (ffi_call_asm, ffi_closure_inner): Adjust interface.

Re: [PATCH] lra: fix FPE when dumping

2018-08-14 Thread Vladimir Makarov
On 08/14/2018 03:42 AM, Ilya Leoshkevich wrote: The following S/390 code struct {} b; void c() { __asm__("la 0,%0\n" "la 1,%1\n" : : "m" (b), "m" (b) : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8",

Re: Improve safe iterator move semantic

2018-08-14 Thread François Dumont
On 10/08/2018 13:26, Ville Voutilainen wrote: On 10 August 2018 at 13:47, Jonathan Wakely wrote: Doing a test like this with TSan should be the absolute minimum required for any change to the mutex locking policy. Agreed. Concurrency code is something that our test suite is not well-equipped t

Re: [PATCH, Darwin, Obvious] Fix PR81685, by adding DWARF 5 section names.

2018-08-14 Thread Mike Stump
On Aug 14, 2018, at 4:38 AM, Iain Sandoe wrote: > Where possible (i.e. they are currently defined), I’ve synced the Darwin > names with the ones > emitted by clang. Thanks.

Re: [PATCH, Darwin] Remove unnecessary target hook.

2018-08-14 Thread Mike Stump
On Aug 13, 2018, at 1:55 PM, Iain Sandoe wrote: > For Darwin when we switch between text sections a linker-visible symbol is > required to preserve the linker’s “atom model”. Some time ago we implemented > TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS to provide this. > > A suitable symbol is now

Re: [PATCH] Fix P81033 for FDEs in partitioned code.

2018-08-14 Thread Mike Stump
On Aug 14, 2018, at 4:20 AM, Iain Sandoe wrote: > When function sub-sections are enabled, Darwin’s assembler needs the FDE > local start > label for each sub-section to follow a linker-visible one so that the FDE > will be correctly > associated with the code of the subsection. > > The current

Re: [PATCH] Use getentropy() for seeding PRNG

2018-08-14 Thread Rainer Orth
Hi Janne, > PING > > On Fri, Aug 3, 2018 at 5:05 PM, Janne Blomqvist > wrote: > >> On Fri, Aug 3, 2018 at 4:28 PM, Jakub Jelinek wrote: >> >>> On Fri, Aug 03, 2018 at 04:19:03PM +0300, Janne Blomqvist wrote: >>> > --- a/libgfortran/intrinsics/random.c >>> > +++ b/libgfortran/intrinsics/random.c

[PATCH] PR libstdc++/86954 use non-placement operator delete

2018-08-14 Thread Jonathan Wakely
As explained in the PR, there's no reason to call the nothrow delete, we can just use the normal one. PR libstdc++/86954 * include/bits/stl_tempbuf.h (return_temporary_buffer): Use non-placement delete. Tested x86_64-linux, committed to trunk. commit dc7ca8956ad18f583fe

Re: [PATCH] Use getentropy() for seeding PRNG

2018-08-14 Thread Janne Blomqvist
On Tue, Aug 14, 2018 at 11:18 PM, Rainer Orth wrote: > Hi Janne, > > > PING > > > > On Fri, Aug 3, 2018 at 5:05 PM, Janne Blomqvist < > blomqvist.ja...@gmail.com> > > wrote: > > > >> On Fri, Aug 3, 2018 at 4:28 PM, Jakub Jelinek wrote: > >> > >>> On Fri, Aug 03, 2018 at 04:19:03PM +0300, Janne B

[PATCH] Deprecate std::get_temporary_buffer

2018-08-14 Thread Jonathan Wakely
This was deprecated in C++17, and has been removed from the current draft. This adds the dprecated attribute for C++17 and later. We can't actually remove it for C++2a because we use it (indirectly) in stl_algo.h. We could rename it to __get_temporary_buffer for our internal uses, and then add ba

Re: [C++ Patch] Tweak check_previous_goto_1 to emit hard errors instead of permerrors in some cases

2018-08-14 Thread Nathan Sidwell
On 08/09/2018 08:07 AM, Paolo Carlini wrote: Hi, over the years we reworked and improved the code in decl.c checking gotos quite a bit. Lately, in some specific unsafe cases, identify_goto issues upfront an error instead of a permerror, whereas it used to always issue a permerror. Over the la

Re: [PATCH] Deprecate std::get_temporary_buffer

2018-08-14 Thread Ville Voutilainen
On 14 August 2018 at 23:34, Jonathan Wakely wrote: > This was deprecated in C++17, and has been removed from the current > draft. This adds the dprecated attribute for C++17 and later. > > We can't actually remove it for C++2a because we use it (indirectly) > in stl_algo.h. We could rename it to _

Re: [PATCH] Fix PR19315.

2018-08-14 Thread Joseph Myers
On Tue, 14 Aug 2018, Iain Sandoe wrote: > 2018-08-14 Iain Sandoe > > gcc/c: > > PR c/19315 > * c-decl.c (finish_decl): Don't add the 'extern' storage class to > objects of unknown size. > > gcc/testsuite: > > PR c/19315 > gcc.dg/graphite/pr82451.c: Make array 'a

Re: [PATCH] [C] Warn when calculating abs(unsigned_value)

2018-08-14 Thread Joseph Myers
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 however, it will pass without silently. The following > patch adds a warning for these cases, bec

Re: [PATCH] convert braced initializers to strings (PR 71625)

2018-08-14 Thread Joseph Myers
On Tue, 14 Aug 2018, James Greenhalgh wrote: > Hi Martin, > > This causes issues for the AArch64 tests (full list below). This change (r263511) also breaks the glibc build for alpha-linux-gnu with build-many-glibcs.py (using mainline GCC and binutils). The error I see is: /scratch/jmyers/gli

Re: [PATCH] convert braced initializers to strings (PR 71625)

2018-08-14 Thread Martin Sebor
On 08/14/2018 03:14 PM, Joseph Myers wrote: On Tue, 14 Aug 2018, James Greenhalgh wrote: Hi Martin, This causes issues for the AArch64 tests (full list below). This change (r263511) also breaks the glibc build for alpha-linux-gnu with build-many-glibcs.py (using mainline GCC and binutils).

[PATCH, rs6000] Fix PR86731 vec_sl()

2018-08-14 Thread Will Schmidt
Hi, Here is a first pass at fixing PR86731, which is an issue introduced when gimple folding the vec_sl() intrinsic. This has been sniff tested (successfully) on a power7. Full regtests for linux/Powerpc systems is pending. I expect I'll need to tweak some of the testcase scan-assembler

C++ PATCH for c++/65043, missing narrowing warning with bool

2018-08-14 Thread Marek Polacek
We weren't complaining about narrowing when converting to bool because standard_conversion wasn't setting check_narrowing for the converting to bool case; it only sets it at the end of the function. Moreover, check_narrowing wasn't catching real_type -> boolean_type at all, which is wrong; [dcl.in

VRP: rewrite the division code (to handle corner cases including 0)

2018-08-14 Thread Aldy Hernandez
Howdy! In auditing the *_DIV_EXPR code I noticed that we were really botching some divisions where the divisor included 0. Particularly interesting was that we were botching something as simple as dividing by [0,0]. We were also incorrectly calculating things like [-2,-2] / [0, ], where

Re: [PATCH] convert braced initializers to strings (PR 71625)

2018-08-14 Thread Martin Sebor
On 08/14/2018 09:24 AM, Martin Sebor wrote: On 08/14/2018 09:08 AM, Martin Sebor wrote: On 08/14/2018 07:27 AM, James Greenhalgh wrote: On Wed, Aug 08, 2018 at 07:17:07PM -0500, Martin Sebor wrote: On 08/08/2018 05:08 AM, Jason Merrill wrote: On Wed, Aug 8, 2018 at 9:04 AM, Martin Sebor wrot

Re: [RFC PATCH, i386]: Deprecate -mmitigate-rop

2018-08-14 Thread Jeff Law
On 08/10/2018 05:42 AM, Uros Bizjak wrote: > This option is fairly ineffective, and in the light of CET, nobody > seems interested to improve it. Deprecate the option, so it won't lure > developers to the land of false security. > > 2018-08-10 Uros Bizjak > > * config/i386/i386.opt (mmitig

Re: [PATCH] avoid MEM_REF when looking for poor-man's flexible arrays (PR 86914)

2018-08-14 Thread Jeff Law
On 08/14/2018 01:01 PM, Martin Sebor wrote: > Attached is a patch to avoid calling array_at_struct_end_p() > with a MEM_REF argument.  The function returns false even if > the reference does point into such a flexible array member, > as in: > >   struct A { char i, a[1]; }; >   void f (struct A *p

Re: [PATCH] lra: fix FPE when dumping

2018-08-14 Thread Jeff Law
On 08/14/2018 01:33 PM, Vladimir Makarov wrote: > On 08/14/2018 03:42 AM, Ilya Leoshkevich wrote: >> The following S/390 code >> >> struct {} b; >> void c() { >>    __asm__("la 0,%0\n" >>    "la 1,%1\n" >>    : >>    : "m" (b), "m" (b) >>   

gcc-patches@gcc.gnu.org

2018-08-14 Thread Jeff Law
On 08/14/2018 10:49 AM, Alexandre Oliva wrote: > I guess this was a cut&pasto. I caught it during code review. It > doesn't seem to matter much: I haven't been able to get any codegen > difference from this change, not in a bootstrap, not in test runs. I > even put a gcc_unreachable() in case th

Re: [PATCH] Fix merging of 2 predictors (PR tree-optimization/86925).

2018-08-14 Thread Jeff Law
On 08/13/2018 06:58 AM, Martin Liška wrote: > Hi. > > Following patch handles and issue seen in Linux kernel. It's about > __builtin_expects seen in a PHI node. > > Another issue I saw is compilation with -frounding-math. In that case > we should use non-rounding math for folding of probability v

Re: [PATCH][Middle-end]patch for fixing PR 86519

2018-08-14 Thread Jeff Law
On 08/14/2018 08:57 AM, Qing Zhao wrote: > Hi, > > PR 86519:New test case gcc.dg/strcmpopt_6.c fails with its introduction in > r262636. > > ***the root cause is: > > for the following call to memcmp: __builtin_memcmp (s->s, "a", 3); > the specified length 3 is larger than the length of "a",

Re: [PATCH][x86] Match movss and movsd "blend" instructions

2018-08-14 Thread Jeff Law
On 08/11/2018 03:54 AM, Allan Sandfeld Jensen wrote: > On Samstag, 11. August 2018 11:18:39 CEST Jakub Jelinek wrote: >> On Sat, Aug 11, 2018 at 10:59:26AM +0200, Allan Sandfeld Jensen wrote: >>> +/* A subroutine of ix86_expand_vec_perm_builtin_1. Try to implement D >>> + using movss or movsd.

Re: [PATCH] Make strlen range computations more conservative

2018-08-14 Thread Jeff Law
On 08/10/2018 10:56 AM, Martin Sebor wrote: > On 08/08/2018 11:36 PM, Jeff Law wrote: >> On 08/02/2018 09:42 AM, Martin Sebor wrote: >> >>> The warning bits are definitely not okay by me.  The purpose >>> of the warnings (-W{format,sprintf}-{overflow,truncation} is >>> to detect buffer overflows. 

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

2018-08-14 Thread Jeff Law
On 08/14/2018 08:08 AM, Martin Sebor wrote: > On 08/14/2018 04:25 AM, Bernd Edlinger wrote: >> Hi, >> >> this patch is a follow-up to my patch here: >> https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01800.html > > As I said multiple times, this patch is redundant -- the issue > is fixed by the solu

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

2018-08-14 Thread Jeff Law
On 08/03/2018 07:00 AM, Bernd Edlinger wrote: > On 08/02/18 22:34, Martin Sebor wrote: >> On 08/02/2018 12:56 PM, Bernd Edlinger wrote: >>> On 08/02/18 15:26, Bernd Edlinger wrote: > >    /* If the length can be computed at compile-time, return it.  */ > -  len = c_strlen (src, 0);

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-14 Thread Jeff Law
On 08/03/2018 03:28 PM, Jakub Jelinek wrote: > On Fri, Aug 03, 2018 at 03:16:41PM -0600, Jeff Law wrote: >> On 07/31/2018 12:33 AM, Jakub Jelinek wrote: >>> On Mon, Jul 30, 2018 at 10:01:38PM -0600, Martin Sebor wrote: > We do not want to change what is currently accepted by the > front end

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-08-14 Thread Jeff Law
On 08/03/2018 03:38 PM, Bernd Edlinger wrote: > On 08/03/18 23:15, Jeff Law wrote: >> On 07/30/2018 02:21 PM, Bernd Edlinger wrote: >>> On 07/30/18 21:52, Martin Sebor wrote: On 07/30/2018 09:24 AM, Bernd Edlinger wrote: > On 07/30/18 01:05, Martin Sebor wrote: >> On 07/29/2018 04:56 A

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

2018-08-14 Thread Jeff Law
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 about done for the night and thus won't get into the series (and as you know Bernd has a competing patch in this space). But I did want to chime in on two things.