Re: [PATCH] expansion: FIx up infinite recusion due to double-word modulo optimization

2020-12-01 Thread Richard Biener
On Tue, 1 Dec 2020, Jakub Jelinek wrote: > Hi! > > Jeff has reported that my earlier patch broke rl78-elf, e.g. with > unsigned short foo (unsigned short x) { return x % 7; } > when compiled with -O2 -mg14. The problem is that rl78 is a BITS_PER_WORD > == 8 target which doesn't have 8-bit

Re: [PATCH] expansion: Further improve double-word modulo, division and divmod [PR97459]

2020-12-01 Thread Richard Biener
On Tue, 1 Dec 2020, Jakub Jelinek wrote: > Hi! > > The following patch implements what Thomas wrote about, in particular > that we can handle also double-word divison by the constants for which > the earlier patch optimized modulo (if it would be otherwise a library > call) and that we can also

Re: [PATCH] Remove misleading debug line entries

2020-12-01 Thread Richard Biener
On Tue, 1 Dec 2020, Bernd Edlinger wrote: > Hi! > > > This removes gimple_debug stmts without block info after a > NULL INLINE_ENTRY. > > The line numbers from these stmts are from the inline function, > but since the inline function is completely optimized away, > there will be no

Re: [PATCH] IBM Z: Use llihf and oilf to load large immediates into GPRs

2020-12-01 Thread Andreas Krebbel via Gcc-patches
On 12/2/20 2:34 AM, Ilya Leoshkevich wrote: > Bootstrapped and regtesed on s390x-redhat-linux. There are slight > improvements in all SPEC benchmarks, no regressions that could not be > "fixed" by adding nops. Ok for master? > > > > Currently GCC loads large immediates into GPRs from the

Re: [PING] [PATCH] libstdc++: Pretty printers for std::_Bit_reference, std::_Bit_iterator and std::_Bit_const_iterator

2020-12-01 Thread Michael Weghorn via Gcc-patches
On 01/12/2020 22.37, Jonathan Wakely wrote: On 27/11/20 16:33 +, Jonathan Wakely wrote: On 25/11/20 15:05 +0100, Michael Weghorn via Libstdc++ wrote: I'd like to ping for this patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553870.html Thanks, I'll take another look next

options.exp: unsupport tests that depend on missing language

2020-12-01 Thread Alexandre Oliva
There's a help.exp test that checks that the help message for -Wabsolute-value mentions it's available in C and ObjC, when compiling a C++ program. However, if GCC is built with the C++ language disabled, the .cc file is compiled as C, and the message [available in C...] becomes [disabled]

Re: [PATCH 1/2] Add TARGET_COMPUTE_MULTILIB hook to override multi-lib result.

2020-12-01 Thread Kito Cheng
Hi Jeff: Defer to gcc-12 is OK to me, we could hold this on downstream :) On Wed, Dec 2, 2020 at 1:27 PM Jeff Law wrote: > > > On 12/1/20 2:29 AM, Kito Cheng wrote: > > Create a new hook to let target could override the multi-lib result, > > the motivation is RISC-V might have very complicated

Re: [PATCH 1/2] Add TARGET_COMPUTE_MULTILIB hook to override multi-lib result.

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 2:29 AM, Kito Cheng wrote: > Create a new hook to let target could override the multi-lib result, > the motivation is RISC-V might have very complicated multi-lib re-use > rule*, which is hard to maintain and use current multi-lib scripts, > we even hit the "argument list too long"

Re: [PATCH 2/2] reset edge probibility and BB-count for peeled/unrolled loop

2020-12-01 Thread Jeff Law via Gcc-patches
On 10/9/20 4:12 AM, guojiufu via Gcc-patches wrote: > Hi, > PR68212 mentioned that the COUNT of unrolled loop was not correct, and > comments of this PR also mentioned that loop become 'cold'. > > This patch fixes the wrong COUNT/PROB of unrolled loop. And the > patch handles the case where

Re: Import AMD HSA API headers

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/24/20 9:16 AM, Andrew Stubbs wrote: > Hi David, All, > > As previously discussed, we need import some new headers for the > ROC/HSA Runtime (for the amdgcn GPU port). > > These are the same files that can be found in the ROCr sources and > install, but AMD have kindly relicensed them

Re: PING^5 [PATCH] Use the section flag 'o' for __patchable_function_entries

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/18/20 7:00 AM, H.J. Lu wrote: > On Sat, Nov 7, 2020 at 7:47 AM H.J. Lu wrote: >> On Sat, Oct 31, 2020 at 5:01 AM H.J. Lu wrote: >>> On Fri, Oct 23, 2020 at 5:41 AM H.J. Lu wrote: On Fri, Oct 2, 2020 at 6:00 AM H.J. Lu wrote: > On Thu, Feb 6, 2020 at 6:57 PM H.J. Lu wrote:

Re: [10/23] Tweak the way that is_a is implemented

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/13/20 1:16 AM, Richard Sandiford via Gcc-patches wrote: > At the moment, class hierarchies that use is_a are expected > to define specialisations like: > > template <> > template <> > inline bool > is_a_helper ::test (symtab_node *p) > { > return p->type == SYMTAB_FUNCTION;

[committed] Use add/sub/neg insns to eliminate compare/test insns on H8

2020-12-01 Thread Jeff Law via Gcc-patches
So this is the first in an unknown number of patches to start optimizing away unnecessary compares and test insns on the H8.    I originally had distinct insns for setting the flags and I still use those patches for comparison purposes, but this patch uses define_subst rather than creating

[committed] loop-iv: Fix typo in `iv_analyze_expr' description

2020-12-01 Thread Maciej W. Rozycki
gcc/ * loop-iv.c: Fix a typo, s/bu/by/, in the `iv_analyze_expr' description in the introduction. --- gcc/loop-iv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: gcc/gcc/loop-iv.c === ---

[r11-5622 Regression] FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-1.c (test for warnings, line 292) on Linux/x86_64

2020-12-01 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, d02c41dd414dcc65a08bc82f312f7808b5d90028 is the first bad commit commit d02c41dd414dcc65a08bc82f312f7808b5d90028 Author: Martin Sebor Date: Tue Dec 1 13:38:08 2020 -0700 PR middle-end/97373 - missing warning on sprintf into allocated destination caused FAIL:

Go testsuite patch committed: Permit */ at end of ERROR line

2020-12-01 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go testsuite driver go-test.exp permits a */ at the end of a ERROR line. This will be used for a test that has no final newline. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * go.test/go-test.exp (errchk): Permit trailing */ on ERROR

[PATCH RESEND] tree-ssa-threadbackward.c (profitable_jump_thread_path): Do not allow __builtin_constant_p.

2020-12-01 Thread Ilya Leoshkevich via Gcc-patches
On Tue, 2020-12-01 at 15:34 -0700, Jeff Law wrote: > > No strong opinions. I think whichever is less invasive in terms of > code > quality is probably the way to go. What we want to avoid is > suppressing > threading unnecessarily as that often leads to false positives from > middle-end based

Re: [PATCH] [Refactor] [AVX512] Combine VI12_AVX512VL with VI48_AVX512VL into VI_AVX512VLBW

2020-12-01 Thread Hongtao Liu via Gcc-patches
On Wed, Dec 2, 2020 at 8:28 AM Jeff Law wrote: > > > > On 11/30/20 10:17 PM, Hongtao Liu via Gcc-patches wrote: > > Hi: > > There're many pairs of define_insn/define_expand that are very similar > > to each other except mode iterator and condition. For these patterns > > VI12_AVX512VL are used

[PATCH] IBM Z: Use llihf and oilf to load large immediates into GPRs

2020-12-01 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtesed on s390x-redhat-linux. There are slight improvements in all SPEC benchmarks, no regressions that could not be "fixed" by adding nops. Ok for master? Currently GCC loads large immediates into GPRs from the literal pool, which is not as efficient as loading two halves

Re: [PATCH] Add feature test macro for atomic::wait

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On 01/12/20 15:45 -0800, Thomas Rodgers via Libstdc++ wrote: Tested x86_64-pc-linux-gnu, committed to trunk. This does a couple more #ifdef -> #if changes. Tested powerpc64le-linux, committed to trunk. commit 670f5095e4aacc30099f6b73c1e67c06df76f36b Author: Jonathan Wakely Date: Wed Dec 2

[committed] libstdc++: Fix filesystem::path pretty printer test failure

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On some systems libstdc++-prettyprinters/cxx17.cc FAILs with this error: skipping: Python Exception 'gdb.Type' object has no attribute 'name': ^M got: $27 = filesystem::path "/dir/."^M FAIL: libstdc++-prettyprinters/cxx17.cc print path2 The gdb.Type.name attribute isn't present in GDB 7.6, so

Re: V3 [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 5:36 PM, H.J. Lu wrote: > On Tue, Dec 1, 2020 at 4:04 PM Jeff Law wrote: >> >> >> On 11/17/20 6:20 AM, H.J. Lu via Gcc-patches wrote: >>> On Mon, Nov 16, 2020 at 7:59 PM Hans-Peter Nilsson >>> wrote: On Fri, 13 Nov 2020, H.J. Lu via Gcc-patches wrote: > Done. Here is the

V3 [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-12-01 Thread H.J. Lu via Gcc-patches
On Tue, Dec 1, 2020 at 4:04 PM Jeff Law wrote: > > > > On 11/17/20 6:20 AM, H.J. Lu via Gcc-patches wrote: > > On Mon, Nov 16, 2020 at 7:59 PM Hans-Peter Nilsson > > wrote: > >> On Fri, 13 Nov 2020, H.J. Lu via Gcc-patches wrote: > >>> Done. Here is the updated patch. > >> Hi. I see a

Re: [PATCH] [Refactor] [AVX512] Combine VI12_AVX512VL with VI48_AVX512VL into VI_AVX512VLBW

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/30/20 10:17 PM, Hongtao Liu via Gcc-patches wrote: > Hi: > There're many pairs of define_insn/define_expand that are very similar > to each other except mode iterator and condition. For these patterns > VI12_AVX512VL are used under condition TARGET_AVX512BW, and > VI48_AVX512VL are used

Re: [PATCH] diagnostics: ignore -fmax-errors for ICE

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 9:35 AM, Martin Liška wrote: > Right now I see: > > ./xgcc -B. ~/Programming/testcases/json.i -c -O2 -fmax-errors=1 > /home/marxin/Programming/testcases/json.i: In function > ‘json_variant_type’: > /home/marxin/Programming/testcases/json.i:22:1: error: non-integral > type switch

Re: [00/23] Make fwprop use an on-the-side RTL SSA representation

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/30/20 5:03 PM, Michael Matz wrote: > Hello, > > On Mon, 30 Nov 2020, Jeff Law wrote: > So, then let's start with one of the prime examples of SSA deconstruction problems, the lost swap, and how it comes to be: we start with a swap: x = ..., y = ... if

Re: [patch][rtl-optimization][i386][pr97777] Fix a reg-stack df maintenance bug triggered by zero-call-used-regs pass.

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/30/20 1:50 PM, Qing Zhao wrote: > Hi, Jeff, > > Sorry for the late reply due to thanksgiving long weekend.  > >> On Nov 25, 2020, at 1:37 PM, Jeff Law > > wrote: >> >> >> >> On 11/19/20 8:59 AM, Qing Zhao via Gcc-patches wrote: >>> Hi,  >>> >>> PR9 - ICE: in

Re: [PATCH/RFC v2] Add -fdiagnostics-path-format=html [v2]

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/10/20 9:08 AM, David Malcolm via Gcc-patches wrote: > Here's an updated version of the HTML output idea from: > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556848.html > > I reworked the HTML path output to show stack frames as well as just > runs of events, using

Re: [PATCH] add -Wmismatched-new-delete to middle end (PR 90629)

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/17/20 11:02 AM, Martin Sebor wrote: > >> >> If you're interested >> torsion.usersys.redhat.com:/opt/notnfs/law/WARNINGS contains all the >> lines with "warning:" from all the Fedora test builds. Warning (pun >> intended), it's big...  10G, so don't try to download it :-)  But it >> is

Re: V2 [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/17/20 6:20 AM, H.J. Lu via Gcc-patches wrote: > On Mon, Nov 16, 2020 at 7:59 PM Hans-Peter Nilsson wrote: >> On Fri, 13 Nov 2020, H.J. Lu via Gcc-patches wrote: >>> Done. Here is the updated patch. >> Hi. I see a test-case for this kind of construct: >> >> int foo

Re: [PATCH] x86: Add -mneeded for GNU_PROPERTY_X86_ISA_1_V[234] marker

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/16/20 6:44 PM, H.J. Lu wrote: > On Mon, Nov 16, 2020 at 4:58 PM Jeff Law wrote: >> >> On 11/9/20 11:57 AM, H.J. Lu via Gcc-patches wrote: >>> GCC 11 supports -march=x86-64-v[234] to enable x86 micro-architecture ISA >>> levels: >>> >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97250

Re: [PATCH] handle conditionals in -Wstringop-overflow et al. (PR 92936)

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/30/20 5:58 PM, Martin Sebor wrote: > > What I meant was that the recursion in compute_objsize has been > there in various forms since at least GCC 8 (it's still in other > parts of GCC today), and it hasn't been a source of reported > problems. Understood.  Could be due to a variety of

Re: [PATCH v2] rs6000, vector integer multiply/divide/modulo instructions

2020-12-01 Thread Carl Love via Gcc-patches
Segher, Pat: I have updated the patch to address the comments below. On Wed, 2020-11-25 at 20:30 -0600, Segher Boessenkool wrote: > On Tue, Nov 24, 2020 at 08:34:51PM -0600, Pat Haugen wrote: > > On 11/24/20 8:17 PM, Pat Haugen via Gcc-patches wrote: > > > On 11/24/20 12:59 PM, Carl Love via

Re: [PATCH] Add feature test macro for atomic::wait

2020-12-01 Thread Thomas Rodgers via Gcc-patches
Tested x86_64-pc-linux-gnu, committed to trunk. Jonathan Wakely writes: > On 30/11/20 10:17 -0800, Thomas Rodgers wrote: >>From: Thomas Rodgers >> >>Adds __cpp_lib_atomic_wait feature test macro which was overlooked in >>the initial commit of this feature. Replaces uses of

Re: [PATCH] expansion: Further improve double-word modulo, division and divmod [PR97459]

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 2:00 PM, Jakub Jelinek wrote: > Hi! > > The following patch implements what Thomas wrote about, in particular > that we can handle also double-word divison by the constants for which > the earlier patch optimized modulo (if it would be otherwise a library > call) and that we can also

Re: [PATCH] cache compute_objsize results in strlen/sprintf (PR 97373)

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 2:21 PM, Martin Sebor wrote: > On 12/1/20 1:57 PM, Martin Sebor wrote: >> On 11/23/20 2:04 PM, Jeff Law wrote: >>> >>> >>> On 11/4/20 5:58 PM, Martin Sebor via Gcc-patches wrote: To determine the target of a pointer expression and the offset into it, the increasingly widely

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-01 Thread Michael Meissner via Gcc-patches
Note this is just to keep the gcc-patches archive up to date. I originally posted this reply but the attached config.log file was too big. It was also sent directly to Jonathan, and he replied. So I canceled the gcc-patches post, and I'm sending out this one with a bzip2's config.log: On Tue,

Re: [PATCH] [tree-optimization] Optimize max/min pattern with comparison

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/30/20 7:00 PM, Eugene Rozenfeld wrote: > Thank you for the review Jeff. > > I don't need to look at the opcode to know the result. The pattern will be > matched only in these 4 cases: > > X <= MAX(X, Y) -> true > X > MAX(X, Y) -> false > X >= MIN(X, Y) -> true > X < MIN(X, Y) -> false >

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-01 Thread Michael Meissner via Gcc-patches
On Tue, Dec 01, 2020 at 10:36:10PM +, Jonathan Wakely wrote: > You need to run autoconf-2.69's autoreconf in the libstdc++-v3 source > tree to regenerate configure, Makefile.in etc. Without doing that > you're just running the same configure script as is on current trunk, > and that doesn't

[committed] Fix mcore multilib specification

2020-12-01 Thread Jeff Law via Gcc-patches
Kito's recent change to multilib handling seems to have exposed a latent mcore bug. The mcore 210 does not support little endian.  Yet we try to build a mcore-210 little-endian multilibs. I don't know why this wasn't failing before, but clearly it's not supposed to work.  This patch adjusts the

[PATCH v4] generate EH info for asm statements (PR93981)

2020-12-01 Thread J.W. Jagersma via Gcc-patches
The following patch extends the generation of exception handling information, so that it is possible to catch exceptions thrown from asm statements, when -fnon-call-exceptions is enabled. Parts of the gcc code already suggested this should be possible, but it was never fully implemented. Both

Re: [pushed] Darwin, D : Adjust the X spec to cater for duplicate use.

2020-12-01 Thread Joseph Myers
On Tue, 1 Dec 2020, Iain Sandoe wrote: > Joseph; I don’t know if you have any advice on a ‘better’ long-term > solution; in some ways I am surprised that the compiler built with > duplicate specifications for a flag - perhaps the uses merged in some > way. Since the use of ‘X’ in D is an

Re: [PATCH] if-to-switch: consider only integral types

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 12:35 PM, Martin Liška wrote: > It fixes ICE seen in the PR which is about gswitch statements > where an index type should be only an integral type. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > >

Re: [PATCH] expansion: FIx up infinite recusion due to double-word modulo optimization

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 2:07 PM, Jakub Jelinek wrote: > Hi! > > Jeff has reported that my earlier patch broke rl78-elf, e.g. with > unsigned short foo (unsigned short x) { return x % 7; } > when compiled with -O2 -mg14. The problem is that rl78 is a BITS_PER_WORD > == 8 target which doesn't have 8-bit

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On Tue, 1 Dec 2020 at 22:25, Michael Meissner wrote: > > On Tue, Dec 01, 2020 at 09:10:30PM +, Jonathan Wakely wrote: > > On Tue, 1 Dec 2020 at 19:13, Michael Meissner via Libstdc++ > > wrote: > > > > > > On Tue, Dec 01, 2020 at 04:04:30PM +, Jonathan Wakely wrote: > > > > On 01/12/20

Re: [PATCH v2] tree-ssa-threadbackward.c (profitable_jump_thread_path): Do not allow __builtin_constant_p () before IPA.

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/23/20 7:36 AM, Ilya Leoshkevich wrote: > On Fri, 2020-11-20 at 12:14 -0700, Jeff Law wrote: >> On 6/30/20 12:46 PM, Ilya Leoshkevich wrote: >>> v1: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547236.html >>> >>> This is the implementation of Jakub's suggestion: allow >>>

Re: [PATCH] introduce --param max-object-size

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/30/20 3:21 PM, Martin Sebor wrote: > On 11/30/20 1:29 PM, Jeff Law wrote: >> >> >> On 11/17/20 7:09 PM, Martin Sebor wrote: >>> On 11/16/20 4:54 PM, Jeff Law wrote: On 11/16/20 2:04 AM, Richard Biener via Gcc-patches wrote: > On Sun, Nov 15, 2020 at 1:46 AM Martin Sebor via

Re: [PATCH] if-to-switch: Support chain with 2 BBs.

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 6:57 AM, Martin Liška wrote: > Hello. > > The following patch is a small tweak than enables more opportunities. > It fixes bug in PR88702 and I see 54 transformations to happen in SPEC > 2006. > Apart from that, I fixed a minor issues which I spotted during bootstrap. > > Patch can

Re: [PATCH] use TYPE_SIZE instead of DECL_SIZE for classes (PR 97595)

2020-12-01 Thread Martin Sebor via Gcc-patches
On 11/24/20 1:09 PM, Jason Merrill wrote: On 11/23/20 7:06 PM, Martin Sebor wrote: On 11/16/20 11:54 PM, Jason Merrill wrote: On 11/16/20 9:41 PM, Martin Sebor wrote: The result of DECL_SIZE_UNIT doesn't always reflect the size of data members of virtual classes.  This can lead to objects of

[committed] Fix more minor testsuite fallout from improved switch optimization

2020-12-01 Thread Jeff Law via Gcc-patches
pr96480 regressed on nds32le-elf after the recent switch table improvements.  Options for this test were tweaked as part of those changes, but they're insufficient to keep it from regressing on nds32le-elf.  This patch disables jump table optimization on that test which resolves the regression.

Re: [wwwdocs] Document libstdc++ header dependency changes

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 2:58 PM, Gerald Pfeifer wrote: > On Thu, 26 Nov 2020, Jonathan Wakely via Gcc-patches wrote: >>> Also explain how to replace dynamic exception specifications. >> And a small correction. > Ah, I was going to point that out. :-) > > Let's see how many ports/packages the header cleanup

Re: [PATCH] gcc-11/changes: Document new configure flag --enable-s390-excess-float-precision

2020-12-01 Thread Gerald Pfeifer
On Thu, 26 Nov 2020, Marius Hillenbrand via Gcc-patches wrote: > To document the new behavior around FLT_EVAL_METHOD and configure flag > --enable-s390-excess-float-precision on s390, I propose this update to > the Release Notes. Please commit to git-wwwdocs if you agree. Thank you, Marius, and

[committed] wwwdocs: Spell front end that way

2020-12-01 Thread Gerald Pfeifer
According to our coding conventions we use "front end" for the noun. I changed this in the GCC 11 release notes and on the way noticed GCC 8 also has an instance. Pushed. Gerald --- htdocs/gcc-11/changes.html | 2 +- htdocs/gcc-8/changes.html | 2 +- 2 files changed, 2 insertions(+), 2

Re: [PATCH] detect allocation/deallocation mismatches in user-defined functions (PR94527)

2020-12-01 Thread Jeff Law via Gcc-patches
On 12/1/20 10:14 AM, Martin Sebor wrote: > On 11/30/20 3:53 PM, Jeff Law wrote: >> >> >> On 11/13/20 2:45 PM, Martin Sebor via Gcc-patches wrote: >>> Bug 94527 is request from the kernel developers for an attribute >>> to indicate that a user-defined function deallocates an object >>> allocated

Re: [wwwdocs] Document libstdc++ header dependency changes

2020-12-01 Thread Gerald Pfeifer
On Thu, 26 Nov 2020, Jonathan Wakely via Gcc-patches wrote: >> Also explain how to replace dynamic exception specifications. > And a small correction. Ah, I was going to point that out. :-) Let's see how many ports/packages the header cleanup is going to break this time. Updating the default

Re: [ Preprocessor ] [ Common ] Feature: Macros for identifying the wide and narrow execution string literal encoding

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/23/20 1:40 PM, JeanHeyd Meneide wrote: > Dear Jeff, > > On Mon, Nov 23, 2020 at 3:02 PM Jeff Law wrote: >> You use a getter function to retrieve the value of ret.to, which is >> fine. Is there a specific reason why you're not using a setter function >> to save the value? > I did

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On Tue, 1 Dec 2020 at 21:10, Jonathan Wakely wrote: > > On Tue, 1 Dec 2020 at 19:13, Michael Meissner via Libstdc++ > wrote: > > > > On Tue, Dec 01, 2020 at 04:04:30PM +, Jonathan Wakely wrote: > > > On 01/12/20 15:10 +, Jonathan Wakely wrote: > > > >On 30/11/20 16:30 -0500, Michael

Re: [PING] [PATCH] libstdc++: Pretty printers for std::_Bit_reference, std::_Bit_iterator and std::_Bit_const_iterator

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On 27/11/20 16:33 +, Jonathan Wakely wrote: On 25/11/20 15:05 +0100, Michael Weghorn via Libstdc++ wrote: I'd like to ping for this patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553870.html Thanks, I'll take another look next week. I've applied the patch now, thanks.

[committed] Minor testsuite fixes after recent switch statement improvements

2020-12-01 Thread Jeff Law via Gcc-patches
Martin L's recent switch table improvements are compromising gcc.dg/pr46309-2.c on a variety of targets.  They turn the series of if statements into a switch, then convert that into a relatively simple overflow test.  The net result is there's nothing interesting left for tree-ssa-reassoc which

Re: [PATCH] cache compute_objsize results in strlen/sprintf (PR 97373)

2020-12-01 Thread Martin Sebor via Gcc-patches
On 12/1/20 1:57 PM, Martin Sebor wrote: On 11/23/20 2:04 PM, Jeff Law wrote: On 11/4/20 5:58 PM, Martin Sebor via Gcc-patches wrote: To determine the target of a pointer expression and the offset into it, the increasingly widely used compute_objsize function traverses the IL following the

Re: [PATCH] c++: Implement LWG3396 Clarify point of reference for source_location::current() [PR80780, PR93093]

2020-12-01 Thread Jakub Jelinek via Gcc-patches
On Tue, Dec 01, 2020 at 04:05:22PM -0500, Jason Merrill wrote: > > I see cp_parser_late_parsing_default_args calls push_defarg_context, > > so perhaps it could check default_arg_context vector, except that > > convert_default_arg calls that too around calling break_out_target_exprs > > which in

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-01 Thread Jonathan Wakely via Gcc-patches
igured) ../gcc/configure --prefix=/home/test/gcc/ieee128/ --enable-libstdcxx-debug --disable-bootstrap --disable-multilib --disable-libvtv --with-system-zlib --without-isl --with-long-double-format=ieee --enable-languages=c,c++,lto --no-create --no-recursion Thread model: posix Supported LTO compression a

Re: [PATCH v2] C-family : Add attribute 'unavailable'.

2020-12-01 Thread Iain Sandoe
Hi Martin, Martin Sebor wrote: On 11/29/20 6:56 PM, Iain Sandoe wrote: Martin Sebor via Gcc-patches wrote: On 11/10/20 12:38 PM, Iain Sandoe wrote: —— commit message. If an interface is marked 'deprecated' then, presumably, at some point it will be withdrawn and no longer available.

[PATCH] expansion: FIx up infinite recusion due to double-word modulo optimization

2020-12-01 Thread Jakub Jelinek via Gcc-patches
Hi! Jeff has reported that my earlier patch broke rl78-elf, e.g. with unsigned short foo (unsigned short x) { return x % 7; } when compiled with -O2 -mg14. The problem is that rl78 is a BITS_PER_WORD == 8 target which doesn't have 8-bit modulo or divmod optab, but has instead 16-bit divmod, so

Re: [PATCH] c++: Implement LWG3396 Clarify point of reference for source_location::current() [PR80780, PR93093]

2020-12-01 Thread Jason Merrill via Gcc-patches
On 12/1/20 3:59 AM, Jakub Jelinek wrote: Hi! While std::source_location::current () is static consteval source_location current() noexcept; in the standard, it also says with LWG3396: "Any call to current that appears as a default member initializer ([class.mem]), or as a subexpression thereof,

[PATCH] expansion: Further improve double-word modulo, division and divmod [PR97459]

2020-12-01 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch implements what Thomas wrote about, in particular that we can handle also double-word divison by the constants for which the earlier patch optimized modulo (if it would be otherwise a library call) and that we can also easily handle such constants shifted to the left.

Re: [PATCH] cache compute_objsize results in strlen/sprintf (PR 97373)

2020-12-01 Thread Martin Sebor via Gcc-patches
On 11/23/20 2:04 PM, Jeff Law wrote: On 11/4/20 5:58 PM, Martin Sebor via Gcc-patches wrote: To determine the target of a pointer expression and the offset into it, the increasingly widely used compute_objsize function traverses the IL following the DEF statements of pointer variables,

[committed] openmp: Avoid ICE on depend clause on depobj OpenMP construct [PR98072]

2020-12-01 Thread Jakub Jelinek via Gcc-patches
Hi! Since r11-5430 we ICE on the following testcase. When parsing the depobj directive we don't really use cp_parser_omp_all_clauses routine which ATM disables generation of location wrappers and the newly added assertion that there are no location wrappers thus triggers. Fixed by adding the

Re: [PATCH] Objective-C++ : Allow prefix attrs on linkage specs.

2020-12-01 Thread Jason Merrill via Gcc-patches
On 11/28/20 4:53 AM, Iain Sandoe wrote: (resending - this didn’t seem to reach gcc-patches@) Jason Merrill wrote: On Mon, Nov 23, 2020 at 8:52 AM Iain Sandoe wrote: Jason Merrill wrote: (NOTE: likewise,   ^~~ starting indent is below ‘int’ for a fixed spacing font) === I’m inclined to

[SPARC] Make -fzero-call-used-regs work

2020-12-01 Thread Eric Botcazou
This contains both a generic fixlet for targets implementing the leaf register optimization (SPARC and Xtensa) and the implementation of the target hook TARGET_ZERO_CALL_USED_REGS, which is needed to make this work on the SPARC. Tested on SPARC/Solaris and SPARC64/Linux, applied on the

[pushed] Darwin, D : Adjust the X spec to cater for duplicate use.

2020-12-01 Thread Iain Sandoe
Hi For Darwin, the '-X' flag is an obsolete spelling for a command to tell the linker to 'strip local symbols'. This has been the default action for a long time - but, as per the usual GCC approach, although the flag is retired, we have not removed it; rather, we just delete it in the driver

Re: [PATCH][pushed] if-to-switch: Fix test-suite patterns.

2020-12-01 Thread Martin Liška
On 12/1/20 8:57 PM, Jakub Jelinek wrote: Would be better to use \[^\n\r]\* instead of .*, with .* you can match parts even from completely different parts of the dump file. Thank you Jakub! I've just pushed a patch with that. Martin

Re: [PATCH][pushed] if-to-switch: Fix test-suite patterns.

2020-12-01 Thread Jakub Jelinek via Gcc-patches
On Tue, Dec 01, 2020 at 08:52:45PM +0100, Martin Liška wrote: > -/* { dg-final { scan-tree-dump "Condition chain with 3 BBs transformed into > a switch statement." "iftoswitch" } } */ > +/* { dg-final { scan-tree-dump "Condition chain with .* BBs transformed into > a switch statement."

[PATCH][pushed] if-to-switch: Fix test-suite patterns.

2020-12-01 Thread Martin Liška
On ppc64le some conditions in BBs are not merged so we merge a different number of BBs. Pushed as obvious. Tested on x86_64-linux-gnu and ppc64le-linux-gnu. gcc/testsuite/ChangeLog: PR testsuite/98085 * g++.dg/tree-ssa/if-to-switch-1.C: Do not expect precise number of

Re: How to traverse all the local variables that declared in the current routine?

2020-12-01 Thread Qing Zhao via Gcc-patches
Hi, Richard, Could you please comment on the following approach: Instead of adding the zero-initializer quite late at the pass “pass_expand”, we can add it as early as during gimplification. However, we will mark these new added zero-initializers as “artificial”. And passing this

C++ Module keywords

2020-12-01 Thread Nathan Sidwell
This adds the module keywords. These are special internal tokens generated by the preprocessor's module-control-line token peeking logic. Spelling them with a space means that they turn back into regular tokens in preprocessor output (but do skew the column numbering :() gcc/c-family/

C++ Module parameters & timers

2020-12-01 Thread Nathan Sidwell
Here is the new parameter and instrumentation timers for modules. gcc/ * params.opt (lazy-modules): New. * timevar.def (TV_MODULE_IMPORT, TV_MODULE_EXPORT) (TV_MODULE_MAPPER): New. pushing to trunk -- Nathan Sidwell diff --git c/gcc/params.opt w/gcc/params.opt

[PATCH] if-to-switch: consider only integral types

2020-12-01 Thread Martin Liška
It fixes ICE seen in the PR which is about gswitch statements where an index type should be only an integral type. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: PR tree-optimization/98084 *

[PATCH] Remove misleading debug line entries

2020-12-01 Thread Bernd Edlinger
Hi! This removes gimple_debug stmts without block info after a NULL INLINE_ENTRY. The line numbers from these stmts are from the inline function, but since the inline function is completely optimized away, there will be no DW_TAG_inlined_subroutine so the debugger has no callstack available at

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-01 Thread Michael Meissner via Gcc-patches
On Tue, Dec 01, 2020 at 04:04:30PM +, Jonathan Wakely wrote: > On 01/12/20 15:10 +, Jonathan Wakely wrote: > >On 30/11/20 16:30 -0500, Michael Meissner via Libstdc++ wrote: > >>Jonathan, could you send a fresh set of patches (or at least replacements)? > >> I > >>tried installing the

C++ Module options

2020-12-01 Thread Nathan Sidwell
This adds the C++ module options, and wires them into lang-specs. The options are not connected to any machinery. The options! They do nothing! Since posting the earlier patch, I added -flang-info-include-translate-not, to warn about header files that are being treated textually.

Re: [PATCH] Avoid atomic for guard acquire when that is expensive

2020-12-01 Thread Bernd Edlinger
On 11/24/20 11:10 PM, Jason Merrill wrote: > On 11/22/20 3:05 AM, Bernd Edlinger wrote: >> Hi, >> >> this avoids the need to use -fno-threadsafe-statics on >> arm-none-eabi or working around that problem by supplying >> a dummy __sync_synchronize function which might >> just lead to silent code

[PATCH] c++: Fix tsubst ICE with invalid code [PR97993, PR97187]

2020-12-01 Thread Marek Polacek via Gcc-patches
I had a strong sense of deja vu when looking into this, and no wonder, since this is almost identical to c++/95728. Since r11-423 tsubst_copy_and_build/TREE_LIST uses tsubst_tree_list instead of open coding it. While the latter could return an error node wrapped in a TREE_LIST, the former can

[PATCH] c++: Fix ICE with inline variable in template [PR97975]

2020-12-01 Thread Marek Polacek via Gcc-patches
In this test, we have static inline const int c = b; in a class template, and we call store_init_value as usual. There, the value is IMPLICIT_CONV_EXPR(b) which is is_nondependent_static_init_expression but isn't is_nondependent_constant_expression (they only differ in STRICT). We call

Re: [PATCH] detect allocation/deallocation mismatches in user-defined functions (PR94527)

2020-12-01 Thread Martin Sebor via Gcc-patches
On 11/30/20 3:53 PM, Jeff Law wrote: On 11/13/20 2:45 PM, Martin Sebor via Gcc-patches wrote: Bug 94527 is request from the kernel developers for an attribute to indicate that a user-defined function deallocates an object allocated by an earlier call to an allocation function.  Their goal is

Re: [PATCH v3 1/2] generate EH info for volatile asm statements (PR93981)

2020-12-01 Thread J.W. Jagersma via Gcc-patches
On 2020-11-30 17:47, J.W. Jagersma wrote: > On 2020-11-23 09:20, Richard Biener wrote: >> On Sun, Nov 22, 2020 at 5:38 PM J.W. Jagersma wrote: >>> >>> On 2020-11-21 12:27, J.W. Jagersma wrote: ... Another idea I had is to introduce a new operand modifier, eg. '-', which would

[PATCH] diagnostics: ignore -fmax-errors for ICE

2020-12-01 Thread Martin Liška
Right now I see: ./xgcc -B. ~/Programming/testcases/json.i -c -O2 -fmax-errors=1 /home/marxin/Programming/testcases/json.i: In function ‘json_variant_type’: /home/marxin/Programming/testcases/json.i:22:1: error: non-integral type switch statement 22 | } | ^ int * switch (v_2(D))

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On 01/12/20 15:10 +, Jonathan Wakely wrote: On 30/11/20 16:30 -0500, Michael Meissner via Libstdc++ wrote: Jonathan, could you send a fresh set of patches (or at least replacements)? I tried installing the patches on a master branch I checked out this morning, and I got two rejects: I

Re: Add pretty-printing support for __is_nothrow_{assignable, constructible}. [PR98054]

2020-12-01 Thread Jason Merrill via Gcc-patches
On 11/30/20 8:50 AM, Marek Polacek wrote: On Mon, Nov 30, 2020 at 01:19:32PM +0200, Ville Voutilainen via Gcc-patches wrote: OK for trunk if full testsuite passes? Should we consider having some sort of test that catches such omissions? IMHO this doesn't require a test. 2020-11-30 Ville

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On 30/11/20 16:30 -0500, Michael Meissner via Libstdc++ wrote: Jonathan, could you send a fresh set of patches (or at least replacements)? I tried installing the patches on a master branch I checked out this morning, and I got two rejects: I don't understand why those chunks failed, but I'll

Re: [PATCH] libstdc++: Add C++ runtime support for new 128-bit long double format

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On 30/11/20 17:29 -0600, Segher Boessenkool wrote: Hi! Thank you for all this. On Wed, Nov 11, 2020 at 09:50:01PM +, Jonathan Wakely wrote: This adds support for the new __ieee128 long double format on powerpc64le targets. * testsuite/27_numerics/complex/abi_tag.cc: Add

Re: [PATCH] c++: Implement LWG3396 Clarify point of reference for source_location::current() [PR80780, PR93093]

2020-12-01 Thread Jakub Jelinek via Gcc-patches
On Tue, Dec 01, 2020 at 01:03:52PM +, Jonathan Wakely wrote: > Most of them pass now, but this case fails: > > using namespace std; > > struct S { > const char* func; > unsigned line = 0; > source_location loc = source_location::current(); > > S(int l, source_location loc =

Re: [PATCH] Add feature test macro for atomic::wait

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On 30/11/20 10:17 -0800, Thomas Rodgers wrote: From: Thomas Rodgers Adds __cpp_lib_atomic_wait feature test macro which was overlooked in the initial commit of this feature. Replaces uses of _GLIBCXX_HAVE_ATOMIC_WAIT. libstdc++-v3/ChangeLog: * include/bits/atomic_base.h: Replace

[committed] libstdc++: Simplify detection of built-in functions

2020-12-01 Thread Jonathan Wakely via Gcc-patches
This fixes a regression affecting the Intel compiler. Because that compiler defines __GNUC__ to match whatever version of GCC it finds on the host system, it might claim to be a brand new GCC despite not actually supporting all the built-ins that the latest GCC supports. This means the config

[PATCH] if-to-switch: Support chain with 2 BBs.

2020-12-01 Thread Martin Liška
Hello. The following patch is a small tweak than enables more opportunities. It fixes bug in PR88702 and I see 54 transformations to happen in SPEC 2006. Apart from that, I fixed a minor issues which I spotted during bootstrap. Patch can bootstrap on x86_64-linux-gnu and survives regression

[PATCH] arm: Improve documentation for effective target 'arm_softfloat'

2020-12-01 Thread Andrea Corallo via Gcc-patches
Hi all, I'd like to submit the following patch to better specify the meaning of the 'arm_softfloat' effective target. As I've recently discovered we can have cases where '-mfloat-abi=hard' is used and the compiler correctly defines '__SOFTFP__'. Effectively 'arm_softfloat' is checking if the

Re: [committed] Fix hppa64-hpux11 build to remove source paths from embedded path.

2020-12-01 Thread John David Anglin
On 2020-12-01 4:29 a.m., Iain Sandoe wrote: > It seems that you didn’t apply (or generate?) the gcc/configure change from > the libtool one. > > Happy to do that before applying mine - but thought you might want to check > first, > thanks Yes please.  It should have been regenerated. Thanks,

Re: [PATCH] c++: Implement LWG3396 Clarify point of reference for source_location::current() [PR80780, PR93093]

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On 01/12/20 09:59 +0100, Jakub Jelinek wrote: Hi! While std::source_location::current () is static consteval source_location current() noexcept; in the standard, it also says with LWG3396: "Any call to current that appears as a default member initializer ([class.mem]), or as a subexpression

Re: [PATCH] dwarf: Add -gdwarf{32,64} options

2020-12-01 Thread Jakub Jelinek via Gcc-patches
On Tue, Dec 01, 2020 at 01:03:07PM +0100, Richard Biener wrote: > > So yes, we can either do a sorry, error, or could just avoid 64-bit > > relocations (depending on endianity instead of emitting > > .quad expression_that_needs_relocation > > emit > > .long expression_that_needs_relocation, 0 > >

Re: [PATCH] dwarf: Add -gdwarf{32,64} options

2020-12-01 Thread Richard Biener
On Tue, 1 Dec 2020, Jakub Jelinek wrote: > On Tue, Dec 01, 2020 at 11:49:43AM +0100, Richard Biener wrote: > > On Tue, 1 Dec 2020, Jakub Jelinek wrote: > > > > > Hi! > > > > > > The following patch makes the choice between 32-bit and 64-bit DWARF > > > formats > > > selectable by command line

  1   2   >