Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-16 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2020/12/15 下午10:40, Segher Boessenkool wrote: > Hi Ke Wen, > > On Tue, Dec 15, 2020 at 03:53:29PM +0800, Kewen.Lin wrote: >> on 2020/12/15 上午2:51, Segher Boessenkool wrote: >>> On Wed, Dec 02, 2020 at 05:44:24PM +0800, Kewen.Lin wrote: --- a/gcc/config/rs6000/rs6000.c +++

Re: [PATCH] bswap: Handle vector CONSTRUCTORs [PR96239]

2020-12-16 Thread Richard Biener
On Tue, 15 Dec 2020, Jakub Jelinek wrote: Hi! The following patch teaches the bswap pass to handle for small (2/4/8 byte long) vectors a CONSTRUCTOR by determining if the bytes of the constructor come from non-vector sources and are either nop or bswap and changing the CONSTRUCTOR in that case

Re: [Ada] Fix serial port baud rate setting on GNU/Linux

2020-12-16 Thread Martin Liška
On 12/16/20 8:56 AM, Iain Sandoe via Gcc-patches wrote: Rainer Orth wrote: Hi Pierre-Marie, This fixes an issue when setting the baud rate. The baud rate is set using the cfsetospeed and cfsetispeed system calls. The code is using speed_t for clarity. The non-blocking status is only reset wh

Re: Libcody breaks configure

2020-12-16 Thread Kewen.Lin via Gcc-patches
on 2020/12/16 下午2:35, Stott Graham via Gcc-patches wrote: > If any ---checking options used > The related PR PR98311[1] has been filed by David. BR, Kewen [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98311

[PATCH/RFC] combine: Tweak the condition of last_set invalidation

2020-12-16 Thread Kewen.Lin via Gcc-patches
Hi, When I was investigating unsigned int vec_init issue on Power, I happened to find there seems something we can enhance in how combine pass invalidate last_set (set last_set_invalid nonzero). Currently we have the check: if (!insn || (value && rsp->last_set_table_tick >= label

Re: [PATCH]AArch64: Add NEON, SVE and SVE2 RTL patterns for Complex Addition, Multiply and FMA.

2020-12-16 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi Richard, > > Here's the split off complex add. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > Checked with armv8-a+sve2+fp16 and no issues. Note that due to a mid-end > limitation SLP for SVE currently fails for some permutes. The tests have >

[PATCH] Fix --enable-gather-detailed-mem-stats build.

2020-12-16 Thread Martin Liška
The build suffers from the static initialization order fiasco: ==30085== Invalid read of size 4 ==30085==at 0x1D451CD: hash_table_mod1 (hash-table.h:344) ==30085==by 0x1D451CD: hash_table::mem_location_hash, vec_usage*, simple_hashmap_traits::mem_location_hash>, vec_usage*> >::hash_ent

Re: [PATCH] Fix --enable-gather-detailed-mem-stats build.

2020-12-16 Thread Iain Sandoe via Gcc-patches
Martin Liška wrote: The build suffers from the static initialization order fiasco: ==30085== Invalid read of size 4 ==30085==at 0x1D451CD: hash_table_mod1 (hash-table.h:344) ==30085==by 0x1D451CD: hash_table::mem_location_hash, vec_usage*, simple_hashmap_traits::mem_location_hash

Re: [PATCH] Fix --enable-gather-detailed-mem-stats build.

2020-12-16 Thread Martin Liška
On 12/16/20 10:08 AM, Iain Sandoe wrote: This will break bootstrap on targets without init_priority (e.g. Darwin) All right, based on the chat on IRC, I suggest using C static constructor with corresponding priority. Ready to be installed? Thanks, Martin >From 4ecf4f8df8d5b6b75cfe7cc5df90176e0

Re: [PATCH] Add -Wtsan.

2020-12-16 Thread Martin Liška
On 12/16/20 1:19 AM, Jeff Law wrote: OK.   Please consider a more through description in invoke.texi though.   What unsupported feature are we warning about and what are the consequences of not supporting that feature. Done that and installed the patch. Thank you for the review, Martin

Re: [PATCH] Fix --enable-gather-detailed-mem-stats build.

2020-12-16 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 16, 2020 at 10:20:09AM +0100, Martin Liška wrote: > So vec_mem_desc is not initialized before a static member in module.cc. > We can fix it by using constructor attribute. > > gcc/ChangeLog: > > * vec.c (init_vec_mem_desc): New function. > (vec_prefix::register_overhead):

Re: [PATCH] Fix --enable-gather-detailed-mem-stats build.

2020-12-16 Thread Martin Liška
On 12/16/20 10:26 AM, Jakub Jelinek wrote: I think this needs to be guarded based on which compiler is used to compile GCC. Do you mean basing that on __GNUC__? Perhaps we could say that we don't support --enable-gather-detailed-mem-stats when the compiler isn't built by GCC (or other compil

Re: [PATCH] Fix --enable-gather-detailed-mem-stats build.

2020-12-16 Thread Rainer Orth
Hi Jakub, > On Wed, Dec 16, 2020 at 10:20:09AM +0100, Martin Liška wrote: >> So vec_mem_desc is not initialized before a static member in module.cc. >> We can fix it by using constructor attribute. [...] >> + of all static variables. */ >> + >> +static void >> +__attribute__((constructor (101))

Re: [Ada] Fix serial port baud rate setting on GNU/Linux

2020-12-16 Thread Rainer Orth
Hi Iain, > Rainer Orth wrote: > >> Hi Pierre-Marie, >> >>> This fixes an issue when setting the baud rate. The baud rate is set >>> using the cfsetospeed and cfsetispeed system calls. The code is using >>> speed_t for clarity. The non-blocking status is only reset when Block is >>> True. And seri

Re: [PATCH] Fix --enable-gather-detailed-mem-stats build.

2020-12-16 Thread Martin Liška
On 12/16/20 10:38 AM, Rainer Orth wrote: Hi Jakub, On Wed, Dec 16, 2020 at 10:20:09AM +0100, Martin Liška wrote: So vec_mem_desc is not initialized before a static member in module.cc. We can fix it by using constructor attribute. [...] + of all static variables. */ + +static void +__attr

Re: libcody: Fix for dash

2020-12-16 Thread Richard Sandiford via Gcc-patches
Nathan Sidwell writes: > Apparently 'var+=...' is not a dash thing. Fixed thusly. > > * config.m4: Avoid non-dash idiom > * configure: Rebuilt. > > pushed (2 patches, because I didn't look carefully enough the first time) Thanks. I think the other uses of += need the same treatme

Re: [Ada] Fix serial port baud rate setting on GNU/Linux

2020-12-16 Thread Iain Sandoe via Gcc-patches
Rainer Orth wrote: Rainer Orth wrote: Hi Pierre-Marie, This fixes an issue when setting the baud rate. The baud rate is set using the cfsetospeed and cfsetispeed system calls. The code is using speed_t for clarity. The non-blocking status is only reset when Block is True. And serial block

Re: [PATCH] rs6000: Use subreg for QI/HI vector init

2020-12-16 Thread Segher Boessenkool
On Wed, Dec 16, 2020 at 04:19:12PM +0800, Kewen.Lin wrote: > on 2020/12/15 下午10:40, Segher Boessenkool wrote: > > I mean do > > > > rtx tmp = force_reg (inner_mode, XVECEXP (vals, 0, i)); > > op[i] = simplify_gen_subreg (SImode, tmp, inner_mode, 0); > > > > If that works (also

Re: [PATCH] [X86] Fold more shuffle builtins to VEC_PERM_EXPR.

2020-12-16 Thread Hongtao Liu via Gcc-patches
On Tue, Dec 15, 2020 at 7:11 PM Jakub Jelinek wrote: > > On Tue, Dec 15, 2020 at 06:10:57PM +0800, Hongtao Liu via Gcc-patches wrote: > > --- a/gcc/config/i386/i386.c > > +++ b/gcc/config/i386/i386.c > > @@ -18187,21 +18187,67 @@ ix86_gimple_fold_builtin (gimple_stmt_iterator > > *gsi) > >

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-16 Thread Maciej W. Rozycki
On Tue, 15 Dec 2020, Jeff Law wrote: > > @@ -1942,7 +1942,7 @@ gen_divdf3_cc (rtx operand0 ATTRIBUTE_UN > > gen_rtx_DIV (DFmode, > > operand1, > > operand2), > > - const0_rtx)), > > + CONST_DOUBLE_ATOF ("0", VOIDmode))), > > gen_rtx_SET (operand0, > > gen_rtx_DIV (D

Re: [PATCH, rs6000] Don't set MMA prefixed instruction length to 8

2020-12-16 Thread Segher Boessenkool
On Mon, Dec 14, 2020 at 04:23:48PM -0600, Pat Haugen wrote: > Prefixed instructions should not have their length explicitly set to '8'. The > function get_attr_length() will adjust the length appropriately based on the > value of the "prefixed" attribute. > > Bootstrap/regtest on powerpc64le (Po

Re: [PATCH 1/2] Remove Report keyword for options

2020-12-16 Thread Martin Liška
On 12/15/20 8:42 PM, Jeff Law wrote: Arguably not a bugfix.  But I think this is reasonable, even during stage3. Thank you. OK by me, but give Richi and Jakub a couple days if they object due to it not being a bugfix. To be honest it's only removal of a dead code. Hope it's fine to instal

RE: [PATCH][GCC][PR target/98177] aarch64: SVE: ICE in expand_direct_optab_fn

2020-12-16 Thread Przemyslaw Wirkus via Gcc-patches
> Przemyslaw Wirkus writes: > > Hi, > > > > Recent 'support SVE comparisons for unpacked integers' patch extends > > operands of define_expands from SVE_FULL to SVE_ALL. This causes an > > ICE hence this PR patch. > > > > This patch adds this relaxation for: > > + reduc__scal_ and > > + arch64_pre

Re: [Ada] Fix serial port baud rate setting on GNU/Linux

2020-12-16 Thread Pierre-Marie de Rodat
Hello all, On Wed, Dec 16, 2020 at 9:31 AM Martin Liška wrote: > I've just create PR for it: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98312 Thank you. I can reproduce the issue: at this point I suspect that my testing hasn’t detected this because of some inconsistency with my incremental b

Re: [PATCH] PR fortran/98284 - ICE in get_array_index

2020-12-16 Thread Thomas Koenig via Gcc-patches
Hi Harald, ICE-on-invalid: testcase by Arseny, draft patch by Steve, slightly polished and regtested by me on x86_64-pc-linux-gnu. OK for master. Thanks for the patch! Best regards Thomas

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-16 Thread Richard Sandiford via Gcc-patches
"Maciej W. Rozycki" writes: > On Tue, 15 Dec 2020, Jeff Law wrote: > >> > @@ -1942,7 +1942,7 @@ gen_divdf3_cc (rtx operand0 ATTRIBUTE_UN >> >gen_rtx_DIV (DFmode, >> >operand1, >> >operand2), >> > - const0_rtx)), >> > + CONST_DOUBLE_ATOF ("0", VOIDmode))), >> >gen_rtx_SET

Re: [PATCH][GCC][PR target/98177] aarch64: SVE: ICE in expand_direct_optab_fn

2020-12-16 Thread Richard Sandiford via Gcc-patches
Przemyslaw Wirkus writes: > > This is a bug in the vectoriser: the vectoriser shouldn't generate > > IFN_REDUC_MAX calls that the target doesn't support. > > > > I think the problem comes from using the wrong interface to get the index > > type for a COND_REDUCTION. vectorizable_reduction has: >

Re: V4 [PATCH 1/3] Switch to a new section if the SECTION_RETAIN bit doesn't match

2020-12-16 Thread H.J. Lu via Gcc-patches
On Tue, Dec 15, 2020 at 4:44 PM Jeff Law wrote: > > > > On 12/15/20 10:30 AM, H.J. Lu wrote: > > When definitions marked with used attribute and unmarked definitions are > > placed in the section with the same name, switch to a new section if the > > SECTION_RETAIN bit doesn't match. > > > > gcc/

[PATCH] libcody: Fix build for older GCC versions

2020-12-16 Thread Jonathan Wakely via Gcc-patches
Before CWG DR 1955 the controlling expression for an #elif must be syntactically correct, meaning this won't compile with C++11 compilers such as gcc 4.8: The solution is to define __has_include(X) as 0 for compilers that don't support it. The second problem is that when is found, it is used wit

c++: Fix (some) solaris breakage

2020-12-16 Thread Nathan Sidwell
Jonathan was kind enough to test this fix. It doesn't address all the solaris issues, but does get us further. Solaris' sys/socket uses the poisoned bcopy identifier, so we must #include it before poisoning. The inclusion happens in cody.hh, so we preemptively copy a bit of cody's inclusion lo

[Ada] Another small adjustment to System.Value_R

2020-12-16 Thread Pierre-Marie de Rodat
This makes the code more explicit for the sake of static analyzers. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-valuer.adb (Scan_Decimal_Digits): Tweak overflow test. (Scan_Integral_Digits): Likewise.diff --git a/gcc/ada/libgnat/s-valuer.adb b/gcc/ada/l

[Ada] Add some OS constants to control serial port

2020-12-16 Thread Pierre-Marie de Rodat
This adds some OS constants that are needed to control the serial port on GNU/Linux. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * s-oscons-tmplt.c: Add some OS constants.diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c --- a/gcc/ada/s-oscons-tmplt.c +++ b/

[Ada] Mark generic body outside of SPARK

2020-12-16 Thread Pierre-Marie de Rodat
Unit Ada.Text_IO.Fixed_IO is now generic, which makes it necessary to exclude the generic body from SPARK explicitly because it uses type Long_Long_Float which is not supported in GNATprove. This ensures that the unit can be instantiated from SPARK code. Tested on x86_64-pc-linux-gnu, committed on

[Ada] Reject junk syntax for Contract_Cases/Test_Case/Subprogram_Variant

2020-12-16 Thread Pierre-Marie de Rodat
Reject contracts Contract_Cases, Test_Case and Subprogram_Variant whose expression is either "null", "(null record)" or has extra parentheses. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Analyze_Aspect_Specifications): Add a codefix for extra parent

[Ada] Fix gmem.out corruption by GNAT.Expect

2020-12-16 Thread Pierre-Marie de Rodat
GNAT.Expect.Non_Blocking_Spawn executes memory allocation/deallocation after calling fork on the child process side. The libgmem library could write to the same gmem.out file in the parent and child processes simultaneously before the child process would load and initialize the new executable file.

[Ada] Fix glitch in comment of System.Powten_Table

2020-12-16 Thread Pierre-Marie de Rodat
There is a typo in the formula to compute Maxpow exposed in the comment. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-powtab.ads (Maxpow): Use explicit formula in comment.diff --git a/gcc/ada/libgnat/s-powtab.ads b/gcc/ada/libgnat/s-powtab.ads --- a/gcc/ada/libg

[Ada] Fix integer-vs-float errors in example for Test_Case pragma

2020-12-16 Thread Pierre-Marie de Rodat
The example for Test_Case pragma was rejected by the compiler; now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Test_Case): Change integer to float literals. * gnat_rm.texi: Regenerate.diff --git a/gcc

[Ada] Fix possible uninitialized ATCB component use

2020-12-16 Thread Pierre-Marie de Rodat
When System.Memory implementation is using Debug_Pools, Common ATCB's uninitialized Global_Task_Lock_Nesting component may be used. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnarl/s-tporft.adb (Register_Foreign_Thread): Set Global_Task_Lock_Nesting before us

[Ada] Simplify membership tests with N_Subprogram_Call subtype

2020-12-16 Thread Pierre-Marie de Rodat
Simplify membership test on N_Procedure_Call_Statement and N_Function_Call using the collective N_Subprogram_Call subtype. Cleanup only; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch6.adb, exp_util.adb, sem_ch4.adb, sem_disp.adb, sem

[Ada] Avoid artificial underflow in System.Val_Real

2020-12-16 Thread Pierre-Marie de Rodat
The final computation now needs to be protected against artificial underflow when the value is very small. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-valrea.adb (Maxexp32): New constant array. (Maxexp64): Likewise. (Maxexp80): Likewise.

[Ada] Refine types of variables for parsing formal object declarations

2020-12-16 Thread Pierre-Marie de Rodat
Local variables in parsing of formal object declarations take only positive values, so their types can be narrowed to Pos. Cleanup only; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * par-ch12.adb (P_Formal_Object_Declarations): Refine types to

[Ada] Fix memory leak in GNAT.Expect.Non_Blocking_Spawn on Windows

2020-12-16 Thread Pierre-Marie de Rodat
It is not leaking on Linux because the memory heap is reinitialized when the new executable is loaded into the child process after calling fork. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/g-expect.adb (Non_Blocking_Spawn): Deallocate elements on Arg_List

[Ada] Remove inconsistent colons in messages for Ada 83 violations

2020-12-16 Thread Pierre-Marie de Rodat
Most of the errors of the form "(Ada 83) ..." don't have a colon; fix inconsistencies. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * par-ch3.adb (P_Modular_Type_Definition): Remove colon from error message. * sem_ch11.adb (Check_Duplication): Likewise.

[Ada] Fix typo in checks for implementation defined units

2020-12-16 Thread Pierre-Marie de Rodat
Fix mismatch in iterating over a range for Ada 2012 and referencing an array for Ada 95. This didn't affect the behaviour, because the referenced boolean flags in both arrays were the same for the iterated subrange. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * impunit.adb

[Ada] Simplify membership tests with N_Delay_Statement subtype

2020-12-16 Thread Pierre-Marie de Rodat
Simplify membership test on N_Delay_Relative_Statement and N_Delay_Until_Statement using the collective N_Delay_Statement subtype. Cleanup only; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch9.adb, sem_warn.adb: Simplify membership test.diff

[Ada] Code cleanup: rename ALI.Scope

2020-12-16 Thread Pierre-Marie de Rodat
Rename it to IS_Scope so that calling scope (node) under gdb is unambiguous, so ease debugging sessions. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ali.ads, ali.adb, bindo-writers.adb, lib-writ.adb (Scope): Renamed to IS_Scope.diff --git a/gcc/ada/ali.adb b/gcc/

[Ada] Add contracts to Ada.Strings.Fixed

2020-12-16 Thread Pierre-Marie de Rodat
This adds complete postconditions and contract cases to subprograms in Ada.Strings.Fixed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-strfix.ads: Add postconditions and contract cases to subprograms. patch.diff.gz Description: application/gzip

[Ada] Handle iterator filters on loop specifications over containers

2020-12-16 Thread Pierre-Marie de Rodat
A loop parameter specification over a container is rewrtten as an iterator specification, so that expansion can use the Iterator opwrations declared for the container type. If an Ada2020 interator filter appears on the loop_parameter_specification it must be transfered to the iterator, and preanaly

[Ada] armhf-linux: symbolic tracebacks

2020-12-16 Thread Pierre-Marie de Rodat
Implement symbolic tracebacks on armhf-linux. It's an ELF target so just a matter of some bookkeeping changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-objrea.ads (Object_Arch): Add ARM enum * libgnat/s-objrea.adb (Initialize): Add EM_ARM case.

Re: [x86] recompute opt flags after opt level change

2020-12-16 Thread Martin Liška
On 10/1/19 10:58 AM, Alexandre Oliva wrote: + if (opts->x_flag_asynchronous_unwind_tables == 2) + opts->x_flag_unwind_tables + = opts->x_flag_asynchronous_unwind_tables = 1; Hello. Spotted that when I tried to make x_flag_asynchronous_unwind_tables a boolean flag. Anyway t

c++tools: Fix (an) install issue

2020-12-16 Thread Nathan Sidwell
David reported an AIX problem, which I think this addresses. I've not looked at pr98314 yet but there's certainly overlap This fixes installers that don't understand -p. c++tools/ (install): Do not use -p, use mkinstalldirs. (clean): Fix typo. pushing to trunk -- Natha

Re: [Ada] Fix serial port baud rate setting on GNU/Linux

2020-12-16 Thread Pierre-Marie de Rodat
On Wed, Dec 16, 2020 at 1:18 PM Pierre-Marie de Rodat wrote: > Thank you. I can reproduce the issue: at this point I suspect that my > testing hasn’t detected this because of some inconsistency with my > incremental builds. The actual correction is a few patches later in my > porting queue: I’m ab

Re: [Ada] Fix serial port baud rate setting on GNU/Linux

2020-12-16 Thread Rainer Orth
Hi Pierre-Marie, > On Wed, Dec 16, 2020 at 1:18 PM Pierre-Marie de Rodat > wrote: >> Thank you. I can reproduce the issue: at this point I suspect that my >> testing hasn’t detected this because of some inconsistency with my >> incremental builds. The actual correction is a few patches later in m

[PATCH] doc: Document that libstdc++ uses __STRICT_ANSI__

2020-12-16 Thread Jonathan Wakely via Gcc-patches
Libstdc++ has been using __STRICT_ANSI__ for years, e.g. to decide whether or not std::is_integral<__int128> should be true. gcc/ChangeLog: * doc/cpp.texi (Common Predefined Macros): Mention that __STRICT_ANSI__ is used by libstdc++ too. OK for trunk? I'd also like to tell users

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-16 Thread Maciej W. Rozycki
On Wed, 16 Dec 2020, Richard Sandiford wrote: > >> Presumably you can't use CONST0_RTX (mode) here?  Assuming that's the > >> case, then this is fine. > > > > Well, `mode' is VOID for simplicity and to match what the middle end > > presents as an operand to the COMPARE operation, as also shown w

Re: [x86] recompute opt flags after opt level change

2020-12-16 Thread Uros Bizjak via Gcc-patches
On Wed, Dec 16, 2020 at 2:18 PM Martin Liška wrote: > > On 10/1/19 10:58 AM, Alexandre Oliva wrote: > > + if (opts->x_flag_asynchronous_unwind_tables == 2) > > + opts->x_flag_unwind_tables > > + = opts->x_flag_asynchronous_unwind_tables = 1; > > Hello. > > Spotted that when I tried

[PATCH] shrink-wrap: Don't put on incoming EDGE_CROSSING [PR98289]

2020-12-16 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned in the PR, shrink-wrapping disqualifies for prologue placement basic blocks that have EDGE_CROSSING incoming edge. I don't see why that is necessary, those edges seem to be redirected just fine, both on x86_64 and powerpc64. In the former case, they are usually conditional jumps

Re: [PATCH] varasm: Fix up __patchable_function_entries handling

2020-12-16 Thread H.J. Lu via Gcc-patches
On Wed, Dec 16, 2020 at 5:05 AM Jakub Jelinek wrote: > > On Wed, Dec 02, 2020 at 05:15:21AM -0800, H.J. Lu via Gcc-patches wrote: > > gcc/ > > > > PR middle-end/93195 > > PR middle-end/93197 > > * configure.ac (HAVE_GAS_SECTION_LINK_ORDER): New. Define 1 if > > the assembl

[committed] libstdc++: Add performance test for atomic_flag [PR 46447]

2020-12-16 Thread Jonathan Wakely via Gcc-patches
This adds a test to compare the performance of std::atomic_flag with similar operations on std::atomic_uchar and std::atomic_int. libstdc++-v3/ChangeLog: PR libstdc++/46447 * testsuite/performance/29_atomics/atomic_flag.cc: New test. Tested powerpc64le-linux. Committed to trunk.

[committed] libstdc++: Test errno macros directly, not via autoconf [PR 93151]

2020-12-16 Thread Jonathan Wakely via Gcc-patches
This fixes a bug caused by a mismatch between the macros defined by when GCC is built and the macros defined by when users include . If the user code is compiled with _XOPEN_SOURCE defined to 500 or 600, Darwin suppresses the ENOTRECOVERABLE and EOWNERDEAD macros, which are not defined by SUSv3 (

[committed] libstdc++: Fix errors from Library Fundamentals TS headers in C++11 [PR 98319]

2020-12-16 Thread Jonathan Wakely via Gcc-patches
Currently the , and headers can be included in C++98 and C++11 modes, but gives errors. With this change they can be included, but define nothing. libstdc++-v3/ChangeLog: PR libstdc++/98319 * include/experimental/random: Only define contents for C++14 and later.

Re: [PATCH] varasm: Fix up __patchable_function_entries handling

2020-12-16 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 16, 2020 at 05:36:04AM -0800, H.J. Lu wrote: > gas is correct. > > > comdat or for retain), then we should do something like the following > > untested change, but if it is gas bug, it should be fixed there. > > > > 2020-12-15 Jakub Jelinek > > > > * varasm.c (default_elf_as

c++: Fix detailed-mem-stat breakage

2020-12-16 Thread Nathan Sidwell
module.cc has a static initializer that ends up in a circular dependency when detailed mem stats are enabled. This removes the need for that initializer to be dynamic, and we punt to the lazy initializing we already had inside the object in question anyway. At the cost of an additional indirect

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-16 Thread Nikhil Benesch via Gcc-patches
On 12/15/20 3:00 AM, Nikhil Benesch wrote: If this patch looks good, I'll submit it upstream tomorrow. Assuming no news is good news, I sent https://go-review.googlesource.com/c/gofrontend/+/278672.

Re: libcody: Fix for dash

2020-12-16 Thread Nathan Sidwell
On 12/16/20 5:02 AM, Richard Sandiford wrote: Nathan Sidwell writes: Apparently 'var+=...' is not a dash thing. Fixed thusly. * config.m4: Avoid non-dash idiom * configure: Rebuilt. pushed (2 patches, because I didn't look carefully enough the first time) Thanks. I think

Re: [PATCH] libcody: Fix build for older GCC versions

2020-12-16 Thread Nathan Sidwell
On 12/16/20 8:05 AM, Jonathan Wakely wrote: Before CWG DR 1955 the controlling expression for an #elif must be syntactically correct, meaning this won't compile with C++11 compilers such as gcc 4.8: The solution is to define __has_include(X) as 0 for compilers that don't support it. The second

Re: [PATCH] varasm: Fix up __patchable_function_entries handling

2020-12-16 Thread Jeff Law via Gcc-patches
On 12/16/20 6:47 AM, Jakub Jelinek wrote: > On Wed, Dec 16, 2020 at 05:36:04AM -0800, H.J. Lu wrote: >> gas is correct. >> >>> comdat or for retain), then we should do something like the following >>> untested change, but if it is gas bug, it should be fixed there. >>> >>> 2020-12-15 Jakub Jeli

libcody: fix --enable-checking=... [PR 98311]

2020-12-16 Thread Nathan Sidwell
Thanks Jakub for pointing at libcpp. The -enable-checking configure code in libcody didn't play well with us. This just uses libcpp's configurey for that piece. libcody/ * configure.ac: Use libcpp's enable-checking code. * configure: Rebuilt. pushing to trunk -- Nathan

[committed] libstdc++: Only use __builtin_sprintf if supported [PR 96083]

2020-12-16 Thread Jonathan Wakely via Gcc-patches
Clang doesn't support __builtin_sprintf, so use std::sprintf instead. libstdc++-v3/ChangeLog: PR libstdc++/96083 * include/ext/throw_allocator.h: Use __has_builtin to check for __builtin_sprintf support, and use std::sprtinf if necessary. Tested powerpc64le-linux. Committ

[PATCH, OpenMP 5.0] Allow duplicate mapping of variables

2020-12-16 Thread Chung-Lin Tang
Hi Jakub, when running sollve_vv tests (which we're trying to make work out-of-the-box), some of the 5.0 tests which were testing map clause ordering also required supporting mapping the same variable multiple times. This was not allowed before, so besides the small changes needed in the front-en

[PATCH, OpenMP 5.0] Basic support of release/delete clauses on target/target-data directives

2020-12-16 Thread Chung-Lin Tang
Hi Jakub, we have some other sollve_vv tests for OpenMP 5.0, which tests the occurrence of 'delete' map kind on the target directive. Looking through the specification, as early as 4.5, it seems that there's no wording that release/delete map kinds are explicitly prohibited on structured block d

Re: Libcody breaks configure

2020-12-16 Thread Nathan Sidwell
On 12/16/20 3:38 AM, Kewen.Lin via Gcc-patches wrote: on 2020/12/16 下午2:35, Stott Graham via Gcc-patches wrote: If any ---checking options used The related PR PR98311[1] has been filed by David. BR, Kewen [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98311 now fixed -- Nathan Sidwell

Re: [PATCH] shrink-wrap: Don't put on incoming EDGE_CROSSING [PR98289]

2020-12-16 Thread Segher Boessenkool
Hi! On Wed, Dec 16, 2020 at 02:35:32PM +0100, Jakub Jelinek wrote: > As mentioned in the PR, shrink-wrapping disqualifies for prologue > placement basic blocks that have EDGE_CROSSING incoming edge. > I don't see why that is necessary, those edges seem to be redirected > just fine, both on x86_64

Re: [PATCH] shrink-wrap: Don't put on incoming EDGE_CROSSING [PR98289]

2020-12-16 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 16, 2020 at 09:28:56AM -0600, Segher Boessenkool wrote: > This used to not work, as mentioned in the original patch submission: > https://patchwork.ozlabs.org/project/gcc/patch/52f14532eb742ac8d878a185a46a88da7b0326eb.1442588483.git.seg...@kernel.crashing.org/ > I wonder what changed?

Re: libcody: fix --enable-checking=... [PR 98311]

2020-12-16 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 16, 2020 at 09:22:49AM -0500, Nathan Sidwell wrote: > Thanks Jakub for pointing at libcpp. > > The -enable-checking configure code in libcody didn't play well with > us. This just uses libcpp's configurey for that piece. > > libcody/ > * configure.ac:

Re: [PATCH] improve caching and enhance array bounds checking

2020-12-16 Thread Martin Sebor via Gcc-patches
On 12/15/20 10:29 PM, Jeff Law wrote: On 11/11/20 6:09 PM, Martin Sebor via Gcc-patches wrote: The attached patch builds on top of the series I posted last week(*) to improve the detection of out of bounds pointers and C++ references, as well as a subset of invalid pointer relational and subtr

Re: [committed] libstdc++: Only use __builtin_sprintf if supported [PR 96083]

2020-12-16 Thread Martin Sebor via Gcc-patches
On 12/16/20 8:00 AM, Jonathan Wakely via Gcc-patches wrote: Clang doesn't support __builtin_sprintf, so use std::sprintf instead. libstdc++-v3/ChangeLog: PR libstdc++/96083 * include/ext/throw_allocator.h: Use __has_builtin to check for __builtin_sprintf support, and use

Re: [committed] libstdc++: Only use __builtin_sprintf if supported [PR 96083]

2020-12-16 Thread Jonathan Wakely via Gcc-patches
On 16/12/20 09:23 -0700, Martin Sebor via Libstdc++ wrote: On 12/16/20 8:00 AM, Jonathan Wakely via Gcc-patches wrote: Clang doesn't support __builtin_sprintf, so use std::sprintf instead. libstdc++-v3/ChangeLog: PR libstdc++/96083 * include/ext/throw_allocator.h: Use __has_bui

Re: [committed] libstdc++: Only use __builtin_sprintf if supported [PR 96083]

2020-12-16 Thread Jonathan Wakely via Gcc-patches
On 16/12/20 17:02 +, Jonathan Wakely wrote: On 16/12/20 09:23 -0700, Martin Sebor via Libstdc++ wrote: On 12/16/20 8:00 AM, Jonathan Wakely via Gcc-patches wrote: Clang doesn't support __builtin_sprintf, so use std::sprintf instead. libstdc++-v3/ChangeLog: PR libstdc++/96083

Re: libcody: fix --enable-checking=... [PR 98311]

2020-12-16 Thread Nathan Sidwell
On 12/16/20 10:40 AM, Jakub Jelinek wrote: On Wed, Dec 16, 2020 at 09:22:49AM -0500, Nathan Sidwell wrote: Thanks Jakub for pointing at libcpp. The -enable-checking configure code in libcody didn't play well with us. This just uses libcpp's configurey for that piece. libcody/

Re: [PATCH] libgcc: Thumb-1 Floating-Point Library for Cortex M0

2020-12-16 Thread Christophe Lyon via Gcc-patches
On Wed, 2 Dec 2020 at 04:31, Daniel Engel wrote: > > Hi Christophe, > > On Thu, Nov 26, 2020, at 1:14 AM, Christophe Lyon wrote: > > Hi, > > > > On Fri, 13 Nov 2020 at 00:03, Daniel Engel wrote: > > > > > > Hi, > > > > > > This patch adds an efficient assembly-language implementation of IEEE- > >

Re: [PATCH] shrink-wrap: Don't put on incoming EDGE_CROSSING [PR98289]

2020-12-16 Thread Segher Boessenkool
On Wed, Dec 16, 2020 at 04:36:37PM +0100, Jakub Jelinek wrote: > On Wed, Dec 16, 2020 at 09:28:56AM -0600, Segher Boessenkool wrote: > > This used to not work, as mentioned in the original patch submission: > > https://patchwork.ozlabs.org/project/gcc/patch/52f14532eb742ac8d878a185a46a88da7b0326eb.

Re: [PATCH] shrink-wrap: Don't put on incoming EDGE_CROSSING [PR98289]

2020-12-16 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 16, 2020 at 11:17:29AM -0600, Segher Boessenkool wrote: > It was just a bootstrap+regression check, so no new testcase was needed. > I don't remember what target, but powerpc (32+64, BE) probably. I'll bootstrap/regtest the patch on powerpc64 and powerpc64le then. > > > The testcase i

Re: [PATCH] shrink-wrap: Don't put on incoming EDGE_CROSSING [PR98289]

2020-12-16 Thread Segher Boessenkool
On Wed, Dec 16, 2020 at 06:31:35PM +0100, Jakub Jelinek wrote: > On Wed, Dec 16, 2020 at 11:17:29AM -0600, Segher Boessenkool wrote: > > It was just a bootstrap+regression check, so no new testcase was needed. > > I don't remember what target, but powerpc (32+64, BE) probably. > > I'll bootstrap/r

c++: Fix offsetof use [PR 98232]

2020-12-16 Thread Nathan Sidwell
offsetof is underspecified. GCC happened to accept an unneeded explicit scoping, clang does not. gcc/cp/ * module.cc (dumper::push): Clangify offsetof use. pushed -- Nathan Sidwell diff --git i/gcc/cp/module.cc w/gcc/cp/module.cc index d2806966e43..e9ea18636b4 100644 --- i/gcc

Re: [committed] libstdc++: Only use __builtin_sprintf if supported [PR 96083]

2020-12-16 Thread Martin Sebor via Gcc-patches
On 12/16/20 10:04 AM, Jonathan Wakely wrote: On 16/12/20 17:02 +, Jonathan Wakely wrote: On 16/12/20 09:23 -0700, Martin Sebor via Libstdc++ wrote: On 12/16/20 8:00 AM, Jonathan Wakely via Gcc-patches wrote: Clang doesn't support __builtin_sprintf, so use std::sprintf instead. libstdc++-v

Re: [RFC] [avr] Toolchain Integration for Testsuite Execution (avr cc0 to mode_cc0 conversion)

2020-12-16 Thread Dimitar Dimitrov
On понеделник, 14 декември 2020 г. 20:53:36 EET Dimitar Dimitrov wrote: > On петък, 11 декември 2020 г. 19:00:35 EET abebeos wrote: > > After "digesting" a bit more your review, I need to thank you for opening > > my eyes re "cherrypick" suggestion and... the missing g++ summaries. I > > need > > t

[PATCH] doc: reflect the publication of C++20 in invoke.texi and standards.texi

2020-12-16 Thread Jakub Jelinek via Gcc-patches
Hi! Jonathan mentioned on IRC that ISO/IEC 14882:2020 has been published yesterday (and indeed it appears on www.iso.org for sale). I think we should reflect that in our documentation and in cxx-status.html, patches attached. I understand we want to keep C++20 support experimental even in GCC 11,

[PATCH] configure: Extend SHF_GNU_RETAIN conftest to check for unsupported gold

2020-12-16 Thread Jozef Lawrynowicz
Since "6fbec038f7a Use SHF_GNU_RETAIN to preserve symbol definitions", GCC could create sections with the 'R' flag, which GAS would map to SHF_GNU_RETAIN. SHF_GNU_RETAIN support was not available in gold until Binutils commit ff4bc37d77, on 2020-12-14. Until the support was added, invalid binaries

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-16 Thread Paul Koning via Gcc-patches
> On Dec 16, 2020, at 6:35 AM, Maciej W. Rozycki wrote: > > ... > NB the PDP-11 pieces affected here and tripping this assertion are I > believe dead code, as these insns are only ever produced by splitters and > do not appear to be referred by their names. Right; I gave them names for do

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-16 Thread Rainer Orth
Hi Nikhil, > On 12/15/20 3:00 AM, Nikhil Benesch wrote: >> If this patch looks good, I'll submit it upstream tomorrow. > > Assuming no news is good news, I sent > https://go-review.googlesource.com/c/gofrontend/+/278672. sorry for the delay, but unfortunately news is not so good: I get runtime_s

Re: [PATCH] doc: reflect the publication of C++20 in invoke.texi and standards.texi

2020-12-16 Thread Jonathan Wakely via Gcc-patches
On 16/12/20 19:36 +0100, Jakub Jelinek wrote: Hi! Jonathan mentioned on IRC that ISO/IEC 14882:2020 has been published yesterday (and indeed it appears on www.iso.org for sale). I think we should reflect that in our documentation and in cxx-status.html, patches attached. I understand we want to

[committed] libstdc++: Warn if __STRICT_ANSI has been undefined

2020-12-16 Thread Jonathan Wakely via Gcc-patches
Recent changes to use __int128 as an integer-like type in and to optimize std::uniform_int_distribution mean that the library relies on __int128 more heavily than in the past. The library expects that if __int128 is supported then either __GLIBCXX_TYPE_INT_N_0 is defined (and we treat is like the

Re: [committed] libstdc++: Only use __builtin_sprintf if supported [PR 96083]

2020-12-16 Thread Jonathan Wakely via Gcc-patches
On 16/12/20 17:02 +, Jonathan Wakely wrote: On 16/12/20 09:23 -0700, Martin Sebor via Libstdc++ wrote: On 12/16/20 8:00 AM, Jonathan Wakely via Gcc-patches wrote: Clang doesn't support __builtin_sprintf, so use std::sprintf instead. libstdc++-v3/ChangeLog: PR libstdc++/96083

c++tools: fix install-strip [PR 98328]

2020-12-16 Thread Nathan Sidwell
I'd missed an install-strip rule in c++tools. Here it is, cribbed from gcc/ subdir. c++tools/ * Makefile.in (INSTALL): Replace with ... (INSTALL_PROGRAM): ... this. (INSTALL_STRIP_PROGRAM): New. (install-strip): New target. (install): Use INSTALL_

Re: c++tools: fix install-strip [PR 98328]

2020-12-16 Thread H.J. Lu via Gcc-patches
On Wed, Dec 16, 2020 at 11:49 AM Nathan Sidwell wrote: > > > I'd missed an install-strip rule in c++tools. Here it is, cribbed > from gcc/ subdir. > > c++tools/ Missing PR other/98328 here. > * Makefile.in (INSTALL): Replace with ... > (INSTALL_PROGRAM): ... this. >

c++: Fix template parm ICE [PR 98297]

2020-12-16 Thread Nathan Sidwell
I think this is nonsense code, we seem to be naming an instantiation of a template template parm. But this fixes the ICE. Perhaps we should diagnose the issue earlier? gcc/cp/ * parser.c (cp_parser_elaborated_type_specifier): Test BOUND_TEMPLATE_TEMPLATE_PARM before che

c++: Another solaris header use [PR 98315]

2020-12-16 Thread Nathan Sidwell
Rather than early-include sys/socket.h, let's allow the includer to tell cody no networking. libcody/ * cody.hh: Allow user to set CODY_NETWORKING. gcc/cp/ * mapper-resolver.cc: Remove early include of sys/socket.h. Specify no CODY_NETWORKING instead.

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-16 Thread Nikhil Benesch via Gcc-patches
On 12/16/20 2:20 PM, Rainer Orth wrote: Hi Nikhil, On 12/15/20 3:00 AM, Nikhil Benesch wrote: If this patch looks good, I'll submit it upstream tomorrow. Assuming no news is good news, I sent https://go-review.googlesource.com/c/gofrontend/+/278672. sorry for the delay, but unfortunately n

[PATCH 2/2]Arm: Add NEON and MVE RTL patterns for Complex Addition.

2020-12-16 Thread Tamar Christina via Gcc-patches
Hi All, This adds implementation for the optabs for complex additions. With this the following C code: void f90 (float complex a[restrict N], float complex b[restrict N], float complex c[restrict N]) { for (int i=0; i < N; i++) c[i] = a[i] + (b[i] * I); } generates

  1   2   >