[PATCH] RISC-V: Canonicalize --with-arch

2020-12-01 Thread Kito Cheng
- We would like to canonicalize the arch string for --with-arch for easier handling multilib, so split canonicalization part to a stand along script to shared the logic. gcc/ChangeLog: * config/riscv/multilib-generator (arch_canonicalize): Move code to arch-canonicalize, an

[PATCH] loop-invariant: JUMP_INSNs aren't loop invariant [PR97954]

2020-12-01 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs because loop invariant motion moves asm goto with a single output as invariant. Normally, jumps aren't really moved, because if they are single set, they have their SET_DEST (pc) and pc_rtx has VOIDmode on which one of the functions find_invariant_insn calls bails o

[PATCH] x86_64: Fix up -fpic -mcmodel=large -fno-plt [PR98063]

2020-12-01 Thread Jakub Jelinek via Gcc-patches
Hi! On the following testcase with -fpic -mcmodel=large -fno-plt we emit call puts@GOTPCREL(%rip) but that is not really appropriate for CM_LARGE_PIC, the .text can be larger than 2GB in that case and the .got slot further away from %rip than what can fit into the signed 32-bit immediate. The fol

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

2020-12-01 Thread Jakub Jelinek via Gcc-patches
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, should correspond to the location of the co

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

2020-12-01 Thread Kito Cheng
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" error when we tried to add more multi-lib reuse rul

[PATCH 2/2] RISC-V: Implement TARGET_COMPUTE_MULTILIB

2020-12-01 Thread Kito Cheng
Use TARGET_COMPUTE_MULTILIB to search the multi-lib reuse for riscv*-*-elf*, according following rules: 1. Check ABI is same. 2. Check both has atomic extension or both don't have atomic extension. - Because mix soft and hard atomic operation doesn't make sense and won't work as expect

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

2020-12-01 Thread Iain Sandoe
Hi Dave, John David Anglin wrote: Fix hppa64-hpux11 build to remove source build paths from embedded path. This change adds the +nodefaultrpath ld option to remove all library paths that were specified with the -L option from the embedded path. Without this options, the emebedded path fo

Re: [PATCH] x86_64: Fix up -fpic -mcmodel=large -fno-plt [PR98063]

2020-12-01 Thread Uros Bizjak via Gcc-patches
On Tue, Dec 1, 2020 at 9:53 AM Jakub Jelinek wrote: > > Hi! > > On the following testcase with -fpic -mcmodel=large -fno-plt we emit > call puts@GOTPCREL(%rip) > but that is not really appropriate for CM_LARGE_PIC, the .text can be larger > than 2GB in that case and the .got slot further away from

[PATCH] middle-end/98070 - fix realloc builtin fnspec

2020-12-01 Thread Richard Biener
realloc clobbers errno, note that. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-12-01 Richard Biener PR middle-end/98070 * builtins.c (builtin_fnspec): realloc is ".Cw ". --- gcc/builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [RFC] Decrease default timeout for libstdc++ tests to 6 minutes

2020-12-01 Thread Christophe Lyon via Gcc-patches
On Mon, 30 Nov 2020 at 15:58, Jonathan Wakely wrote: > > On 27/11/20 21:17 +0100, Christophe Lyon via Libstdc++ wrote: > >On Fri, 27 Nov 2020 at 17:13, Jonathan Wakely via Gcc-patches > > wrote: > >> > >> The default for the GCC testsuite is 300, i.e. 5 minutes, which is the > >> same as the DejaG

Re: [PATCH] loop-invariant: JUMP_INSNs aren't loop invariant [PR97954]

2020-12-01 Thread Richard Biener
On Tue, 1 Dec 2020, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs because loop invariant motion moves asm goto > with a single output as invariant. > Normally, jumps aren't really moved, because if they are single set, > they have their SET_DEST (pc) and pc_rtx has VOIDmode on which

[PATCH V2] arm: [testsuite] fix lob tests for -mfloat-abi=hard

2020-12-01 Thread Andrea Corallo via Gcc-patches
Hi all, second version of this patch here fixing lob[2-5].c tests for hard float abi targets implementing Kyrill's suggestions. Okay for trunk? Andrea >From f7f36b243c82a5dd49540cc48ceb8ce636872d5a Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 26 Nov 2020 12:33:18 +0100 Subject: [

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

2020-12-01 Thread Richard Sandiford via Gcc-patches
Michael Matz writes: > 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 (cond) >> >> t

Re: [PATCH 1/2] IBM Z: Configure excess precision for float at compile-time

2020-12-01 Thread Andreas Krebbel via Gcc-patches
On 11/25/20 6:06 PM, Marius Hillenbrand wrote: > Historically, float_t has been defined as double on s390 and gcc would > emit double precision insns for evaluating float expressions when in > standard-compliant mode. Configure that behavior at compile-time as prep > for changes in glibc: When glib

Re: [PATCH 2/2] gcc/testsuite/s390: Add test cases for float_t

2020-12-01 Thread Andreas Krebbel via Gcc-patches
On 11/25/20 6:06 PM, Marius Hillenbrand wrote: > Add two test cases that check for acceptable combinations of float_t and > FLT_EVAL_METHOD on s390x. > > Tested against an as-is glibc and one modified so that it derives > float_t from FLT_EVAL_METHOD. > > gcc/testsuite/ChangeLog: > > 2020-11-25

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-12-01 Thread Richard Biener via Gcc-patches
On Fri, Nov 27, 2020 at 4:07 PM Martin Liška wrote: > > On 11/20/20 3:37 PM, Richard Biener wrote: > > On Fri, Nov 20, 2020 at 9:57 AM Martin Liška wrote: > >> > >> On 11/19/20 3:46 PM, Richard Biener wrote: > >>> OK, so can you send an updated patch? > > > > + tree pos_one = build_int_cst (

Re: [PATCH] Introduce can_vec_cmp_compare_p

2020-12-01 Thread Richard Biener via Gcc-patches
On Thu, Nov 26, 2020 at 8:27 PM Ilya Leoshkevich via Gcc-patches wrote: > > Bootstrapped and regtested on x86_64-redhat-linux and > s390x-redhat-linux. Ok for master? OK/ Thanks, Richard. > > > This is the same as dcd2ca63ec5c ("Introduce can_vcond_compare_p > function"), but for vec_cmp. The

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

2020-12-01 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch makes the choice between 32-bit and 64-bit DWARF formats selectable by command line switch, rather than being hardcoded through DWARF_OFFSET_SIZE macro. The options themselves don't turn on debug info themselves, so one needs to use -g -gdwarf64 or similar. Ok for trunk i

[committed] libstdc++: Link test with libatomic if needed [PR 98003]

2020-12-01 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/98003 * testsuite/27_io/basic_syncbuf/sync_ops/1.cc: Add options for libatomic. Tested x86_64-linux. Committed to trunk. commit 58f71a34c68711c4432b45086bfcccb78be7ace5 Author: Jonathan Wakely Date: Tue Dec 1 10:36:09 2020 libs

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

2020-12-01 Thread Richard Biener
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 switch, rather than being hardcoded through > DWARF_OFFSET_SIZE macro. > > The options themselves don't turn on debug info themselves, so o

Re: [RFC] Decrease default timeout for libstdc++ tests to 6 minutes

2020-12-01 Thread Jonathan Wakely via Gcc-patches
On 01/12/20 10:45 +0100, Christophe Lyon wrote: On Mon, 30 Nov 2020 at 15:58, Jonathan Wakely wrote: On 27/11/20 21:17 +0100, Christophe Lyon via Libstdc++ wrote: >On Fri, 27 Nov 2020 at 17:13, Jonathan Wakely via Gcc-patches > wrote: >> >> The default for the GCC testsuite is 300, i.e. 5 minu

Re: [PATCH] testsuite: Correct check_effective_target_hwaddress_exec

2020-12-01 Thread Christophe Lyon via Gcc-patches
On Fri, 27 Nov 2020 at 19:46, Matthew Malcomson wrote: > > Hello, > > - > > This test should ensure that we can compile with hwasan, that such a compiled > binary runs as expected, *and* that we're running on a kernel which implements > the capability to ignore the top bytes of pointers in sys

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

2020-12-01 Thread Jakub Jelinek via Gcc-patches
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 switch, rather than being hardcoded through > > DWARF_OFFSET_SIZ

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 s

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

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 ther

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

[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 tar

[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 test

[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 check

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 usage

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 = source_lo

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 u9__

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 r

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 Vo

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 don

[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)) [INV],

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 signif

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 t

[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 fol

[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 ret

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 fai

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

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 patch

[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 t

[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 * gimple-if-

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 in

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/

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 “artificial”

[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 BB

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

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

[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 sel

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

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

[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 loc

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

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

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: 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 my

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.

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

2020-12-01 Thread Jonathan Wakely via Gcc-patches
languages=c,c++ : (reconfigured) ../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: pos

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 the

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 DEF

[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 is

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

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 Meiss

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 thi

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 ve

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

[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 deletio

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

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 i

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

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 s

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 bo

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 G

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

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 15:

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 modul

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 > > gcc/Change

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 upstream

[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 vol

[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

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 eve

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

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] 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] 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 >>_GLIBCXX_HAVE_ATOMIC

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

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 fac

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: 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 __attribute__((__used

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 fast

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 drop-shadows

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 df_

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 (c

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 state

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 un

  1   2   >