[PATCH] fold-const: Fix native_encode_initializer bitfield handling [PR98199]

2020-12-09 Thread Jakub Jelinek via Gcc-patches
Hi! With the bit_cast changes, I have added support for bitfields which don't have scalar representatives. For bit_cast it works fine, as when mask is non-NULL, off is asserted to be 0. But when native_encode_initializer is called e.g. from sccvn with off > 0 (i.e. we are interested in encoding

Re: [PATCH] phiopt: Fix up two_value_replacement BOOLEAN_TYPE handling for Ada [PR98188]

2020-12-09 Thread Richard Biener
On Wed, 9 Dec 2020, Jakub Jelinek wrote: > Hi! > > For Ada with LTO, boolean_{false,true}_node can be 1-bit precision boolean, > while TREE_TYPE (lhs) can be 8-bit precision boolean and thus we can end up > with wide_int mismatches. > > The following patch fixes it by using TYPE_{MIN,MAX}_VALUE

Re: [PATCH] phiopt: Fix up two_value_replacement BOOLEAN_TYPE handling for Ada [PR98188]

2020-12-09 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 09, 2020 at 09:03:36AM +0100, Richard Biener wrote: > > For Ada with LTO, boolean_{false,true}_node can be 1-bit precision boolean, > > while TREE_TYPE (lhs) can be 8-bit precision boolean and thus we can end up > > with wide_int mismatches. > > > > The following patch fixes it by usin

Re: [PATCH] fold-const: Fix native_encode_initializer bitfield handling [PR98199]

2020-12-09 Thread Richard Biener
On Wed, 9 Dec 2020, Jakub Jelinek wrote: > Hi! > > With the bit_cast changes, I have added support for bitfields which don't > have scalar representatives. For bit_cast it works fine, as when mask > is non-NULL, off is asserted to be 0. But when native_encode_initializer > is called e.g. from s

Re: [PATCH] phiopt: Fix up two_value_replacement BOOLEAN_TYPE handling for Ada [PR98188]

2020-12-09 Thread Richard Biener
On Wed, 9 Dec 2020, Jakub Jelinek wrote: > On Wed, Dec 09, 2020 at 09:03:36AM +0100, Richard Biener wrote: > > > For Ada with LTO, boolean_{false,true}_node can be 1-bit precision > > > boolean, > > > while TREE_TYPE (lhs) can be 8-bit precision boolean and thus we can end > > > up > > > with wi

Re: [PATCH] phiopt: Fix up two_value_replacement BOOLEAN_TYPE handling for Ada [PR98188]

2020-12-09 Thread Eric Botcazou
> I'm sure: > /* In Ada, we use an unsigned 8-bit type for the default boolean type. */ > boolean_type_node = make_unsigned_type (8); > TREE_SET_CODE (boolean_type_node, BOOLEAN_TYPE); > SET_TYPE_RM_MAX_VALUE (boolean_type_node, > build_int_cst (boolean_type_node, 1)

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

2020-12-09 Thread Richard Biener via Gcc-patches
On Tue, Dec 8, 2020 at 8:54 PM Qing Zhao wrote: > > > > On Dec 8, 2020, at 1:40 AM, Richard Biener wrote: > > On Mon, Dec 7, 2020 at 5:20 PM Qing Zhao wrote: > > > > > On Dec 7, 2020, at 1:12 AM, Richard Biener wrote: > > On Fri, Dec 4, 2020 at 5:19 PM Qing Zhao wrote: > > > > > On Dec 4, 2020

Re: [PATCH] phiopt: Fix up two_value_replacement BOOLEAN_TYPE handling for Ada [PR98188]

2020-12-09 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 09, 2020 at 09:03:36AM +0100, Richard Biener wrote: > So maybe do > > >if (TREE_CODE (TREE_TYPE (lhs)) == BOOLEAN_TYPE > && TYPE_PRECISION (TREE_TYPE (lhs)) == 1) > > and thus rely on get_range_info for Ada? So, like this instead (if it passes bootstrap/regtest)? Basical

Re: [PATCH] phiopt: Fix up two_value_replacement BOOLEAN_TYPE handling for Ada [PR98188]

2020-12-09 Thread Richard Biener
On Wed, 9 Dec 2020, Jakub Jelinek wrote: > On Wed, Dec 09, 2020 at 09:03:36AM +0100, Richard Biener wrote: > > So maybe do > > > > >if (TREE_CODE (TREE_TYPE (lhs)) == BOOLEAN_TYPE > > && TYPE_PRECISION (TREE_TYPE (lhs)) == 1) > > > > and thus rely on get_range_info for Ada? > > So,

Re: [r11-5839 Regression] FAIL: gcc.target/i386/pr78102.c scan-assembler-times pcmpeqq 3 on Linux/x86_64

2020-12-09 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 9 Dec 2020 at 00:29, sunil.k.pandey wrote: > > On Linux/x86_64, > > 3a6e3ad38a17a03ee0139b49a0946e7b9ded1eb1 is the first bad commit > commit 3a6e3ad38a17a03ee0139b49a0946e7b9ded1eb1 > Author: Prathamesh Kulkarni > Date: Tue Dec 8 14:30:04 2020 +0530 > > gimple-isel: Fold x CMP y ?

[PATCH] Add -Wtsan.

2020-12-09 Thread Martin Liška
Hello. The newly added warning is about warning a user that std::atomic_thread_fence is not supported by TSAN. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: PR sanitizer/97868 * common.opt: Add new w

[PATCH] combine: zeroing cost for new copies

2020-12-09 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to treat those new pseudo-to-pseudo copies after hard-reg-to-pseudo-copy as zero costs. The justification is that these new copies are closely after the corresponding hard-reg-to-pseudo-copy insns, register allocation should be able to coalesce them and get them eliminated. Now

Re: [PATCH 1/2] libstdc++: Add --enable-pure-stdio-libstdcxx option

2020-12-09 Thread Jonathan Wakely via Gcc-patches
On 07/12/20 12:36 -0800, Keith Packard wrote: Jonathan Wakely writes: GCC changelog files are autogenerated now, so patches should not touch them. Just include the ChangeLog entry in the Git commit log (which will usually end up being quoted in the patch and/or the email body of the mail to gc

[PATCH] Fix up testcase.

2020-12-09 Thread Hongtao Liu via Gcc-patches
On Wed, Dec 9, 2020 at 5:22 PM Prathamesh Kulkarni via Gcc-patches wrote: > > On Wed, 9 Dec 2020 at 00:29, sunil.k.pandey wrote: > > > > On Linux/x86_64, > > > > 3a6e3ad38a17a03ee0139b49a0946e7b9ded1eb1 is the first bad commit > > commit 3a6e3ad38a17a03ee0139b49a0946e7b9ded1eb1 > > Author: Pratha

RE: [PATCH v2 13/16]Arm: Add support for auto-vectorization using HF mode.

2020-12-09 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Tamar Christina > Sent: 25 September 2020 15:31 > To: gcc-patches@gcc.gnu.org > Cc: nd ; Ramana Radhakrishnan > ; Richard Earnshaw > ; ni...@redhat.com; Kyrylo Tkachov > > Subject: [PATCH v2 13/16]Arm: Add support for auto-vectorization using HF > mode. > >

Re: Go testsuite patch committed: Don't quote quoted parentheses

2020-12-09 Thread Andreas Schwab
This breaks make -C gcc check-go RUNTESTFLAGS="go-test.exp=chan.go": ERROR: tcl error sourcing /opt/gcc/gcc-20201209/gcc/testsuite/go.test/go-test.exp. ERROR: couldn't compile regular expression pattern: parentheses () not balanced while executing "regsub -all "

[PATCH] c/98200 - improve error recovery for GIMPLE FE

2020-12-09 Thread Richard Biener
This avoids ICEing by making sure to propagate error early. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-12-09 Richard Biener PR c/98200 gcc/c/ * gimple-parser.c (c_parser_gimple_postfix_expression): Return early on error. * gcc.dg/gimplef

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Tobias Burnus
On 08.12.20 13:30, Jakub Jelinek wrote: On Tue, Dec 08, 2020 at 01:13:07PM +0100, Tobias Burnus wrote: +if (list == OMP_LIST_REDUCTION) + has_inscan = true; This looks weird, I would have expected if (list == OMP_LIST_REDUCTION_INSCAN) That's not only weird, that was

Re: [Patch] OpenMP: C/C++ parse 'omp allocate'

2020-12-09 Thread Tobias Burnus
On 08.12.20 18:56, Jakub Jelinek wrote: On Mon, Nov 23, 2020 at 03:50:33PM +0100, Tobias Burnus wrote: Given that (at least for C/C++) there is some initial support for OpenMP 5.0's allocators, it is likely that users will try it. Sadly at least the current implementation doesn't offer much ben

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Thomas Schwinge
Hi! On 2020-12-09T12:06:21+0100, Tobias Burnus wrote: > On 08.12.20 13:30, Jakub Jelinek wrote: >> On Tue, Dec 08, 2020 at 01:13:07PM +0100, Tobias Burnus wrote: >>> +case EXEC_OMP_SCAN: >>> + /* Flag is only used to checking, hence, it is unset afterwards. */ >>> + if (!code->ext.

Re: Help with PR97872

2020-12-09 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 8 Dec 2020 at 14:36, Prathamesh Kulkarni wrote: > > On Mon, 7 Dec 2020 at 17:37, Hongtao Liu wrote: > > > > On Mon, Dec 7, 2020 at 7:11 PM Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 7 Dec 2020 at 16:15, Hongtao Liu wrote: > > > > > > > > On Mon, Dec 7, 2020 at 5:47 PM Richard Bi

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 09, 2020 at 12:36:26PM +0100, Thomas Schwinge wrote: > Yeah, that re-purposing of 'if_present' made me raise an eyebrow, too. I've missed yesterday that the if_present is on the EXEC_OMP_SCAN, not on some outer EXEC that could be arbitrary and as !$omp scan can have only exclusive and

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Thomas Schwinge
Hi! On 2020-12-09T12:51:57+0100, Jakub Jelinek wrote: > On Wed, Dec 09, 2020 at 12:36:26PM +0100, Thomas Schwinge wrote: >> Yeah, that re-purposing of 'if_present' made me raise an eyebrow, too. > > I've missed yesterday that the if_present is on the EXEC_OMP_SCAN, not on > some outer EXEC that c

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Tobias Burnus
On 09.12.20 12:36, Thomas Schwinge wrote: I'm confirming that it seems to work (that is, doesn't seem to cause any obvious interference); OK to verify/document that as in the attached "Add 'gfortran.dg/goacc-gomp/omp-scan-1-if_present.f90'"? I don't think the testcase is useful, but I wouldn't

[PATCH] Limit perf data buffer during feature checking

2020-12-09 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on x86_64-redhat-linux. Ok for master? Commit 2ead1ab91123 ("Limit perf data buffer during profiling") added -m8 to perf invocations during running tests, but the same problem exists for checking whether perf is working in the first place. gcc/testsuite/ChangeLog: 202

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

2020-12-09 Thread abebeos via Gcc-patches
Essence: I need a confirmation that the testsuite setup as presented in: https://github.com/abebeos/avr-gnu works fine. The problem with the avr target is that the testsuite cannot be run easily, mainly because of the need for a special simulated-target setup, which does not work for avr as doc

RE: [PATCH][GCC] aarch64: Add +pauth to -march

2020-12-09 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Przemyslaw Wirkus > Sent: 07 December 2020 21:20 > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; Richard Sandiford > ; Kyrylo Tkachov > ; Marcus Shawcroft > > Subject: [PATCH][GCC] aarch64: Add +pauth to -march > > New +pauth (Pointer Authentication

c++: Decl module-specific semantic processing

2020-12-09 Thread Nathan Sidwell
This adds the module-specific logic to the various declaration processing routines in decl.c and semantic.c. I also adjust the rtti type creation, as those are all in the global module, so we need to temporarily clear the module_kind, when they are being created. Finally, I added init and fini m

[PATCH] RISC-V: Explicitly call python when using multilib generator

2020-12-09 Thread Simon Cook
When building GCC for RISC-V with the --with-multilib-generator option, it may not be possible to call arch-canonicalize as an executable when building on Windows. Instead directly invoke the expected python interpreter for this step. gcc/ChangeLog: * config/riscv/multilib-generator (arch

Re: [PATCH 00/31] VAX: Bring the port up to date (yes, MODE_CC conversion is included)

2020-12-09 Thread Maciej W. Rozycki
On Sat, 28 Nov 2020, Paul Koning wrote: > > Hmm, I gather those systems are able to run some kind of BSD Unix: don't > > they support the r-commands which would allow you to run DejaGNU testing > > with a realistic environment PDP-11 hardware would be usually used with, > > possibly on actual h

[PATCH] aarch64: Add CPU-specific SVE vector costs struct

2020-12-09 Thread Kyrylo Tkachov via Gcc-patches
Hi all, This patch extends the backend vector costs structures to allow for separate Advanced SIMD and SVE costs. The fields in the current cpu_vector_costs that would vary between the ISAs are moved into a simd_vec_cost struct and we have two typedefs of it: advsimd_vec_cost and sve_vec_costs.

[PATCH][pushed] testsuite: fix 2 tests on aarch64

2020-12-09 Thread Martin Liška
gcc/testsuite/ChangeLog: PR tree-optimization/98182 * gcc.dg/tree-ssa/if-to-switch-1.c: Add case-values-threshold in order to fix them for aarch64. * gcc.dg/tree-ssa/if-to-switch-10.c: Likewise. --- gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-1.c | 2 +- gcc/tests

Re: RFC: ARM MVE and Neon auto-vectorization

2020-12-09 Thread Andre Vieira (lists) via Gcc-patches
On 08/12/2020 13:50, Christophe Lyon via Gcc-patches wrote: Hi, My 'vand' patch changes the definition of VDQ so that the relevant modes are enabled only when !TARGET_HAVE_MVE (V8QI, ...), and this helps writing a simpler expander. However, vneg is used by vshr (right-shifts by register are

Re: [PATCH] RISC-V: Explicitly call python when using multilib generator

2020-12-09 Thread Matthias Klose
On 12/9/20 3:03 PM, Simon Cook wrote: > When building GCC for RISC-V with the --with-multilib-generator option, > it may not be possible to call arch-canonicalize as an executable when > building on Windows. Instead directly invoke the expected python > interpreter for this step. > > gcc/ChangeLog

Re: [PATCH] RISC-V: Explicitly call python when using multilib generator

2020-12-09 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 09, 2020 at 03:57:51PM +0100, Matthias Klose wrote: > On 12/9/20 3:03 PM, Simon Cook wrote: > > When building GCC for RISC-V with the --with-multilib-generator option, > > it may not be possible to call arch-canonicalize as an executable when > > building on Windows. Instead directly in

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

2020-12-09 Thread Qing Zhao via Gcc-patches
> On Dec 9, 2020, at 2:23 AM, Richard Biener wrote: > > On Tue, Dec 8, 2020 at 8:54 PM Qing Zhao > wrote: >> >> >> >> On Dec 8, 2020, at 1:40 AM, Richard Biener > > wrote: >> >> On Mon, Dec 7, 2020 at 5:20 PM Qing Zhao >

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

2020-12-09 Thread Richard Biener via Gcc-patches
On Wed, Dec 9, 2020 at 4:04 PM Qing Zhao wrote: > > > > On Dec 9, 2020, at 2:23 AM, Richard Biener wrote: > > On Tue, Dec 8, 2020 at 8:54 PM Qing Zhao wrote: > > > > > On Dec 8, 2020, at 1:40 AM, Richard Biener wrote: > > On Mon, Dec 7, 2020 at 5:20 PM Qing Zhao wrote: > > > > > On Dec 7, 2020

c++: Module parsing

2020-12-09 Thread Nathan Sidwell
This adds the module-declaration parsing and other logic. We have two new kinds of declaration -- module and import. Plus the ability to export other declarations. The module processing can also divide the TU into several portions -- GMF, Purview and PMF. There are restrictions that some decl

[PATCH] data-ref: Rework integer handling in split_constant_offset [PR98069]

2020-12-09 Thread Richard Sandiford via Gcc-patches
PR98069 is about a case in which split_constant_offset miscategorises an expression of the form: int foo; … POINTER_PLUS_EXPR as: base: base offset: (sizetype) (-foo) * size init: INT_MIN * size “-foo” overflows when “foo” is INT_MIN, whereas the original expression didn't overflow

Re: [PATCH 30/31] PR target/95294: VAX: Convert backend to MODE_CC representation

2020-12-09 Thread Maciej W. Rozycki
On Fri, 20 Nov 2020, Maciej W. Rozycki wrote: > Outliers: > > old new change %change filename > > 24062950+544+22.610 20111208-1.exe > 43145329+1015 +23.528 pr39417.exe > 22353055+820+36.689 990404-1.e

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

2020-12-09 Thread Qing Zhao via Gcc-patches
> On Dec 9, 2020, at 9:12 AM, Richard Biener wrote: > > On Wed, Dec 9, 2020 at 4:04 PM Qing Zhao > wrote: >> >> >> >> On Dec 9, 2020, at 2:23 AM, Richard Biener >> wrote: >> >> On Tue, Dec 8, 2020 at 8:54 PM Qing Zhao wrote: >> >> >> >> >> On Dec 8, 202

[PATCH] tree-optimization/98213 - cache PHI walking result in SM

2020-12-09 Thread Richard Biener
This avoids exponential work when walking PHIs in loop store motion. Fails are quickly propagated and thus need no caching. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-12-09 Richard Biener PR tree-optimization/98213 * tree-ssa-loop-im.c (sm_seq_valid_bb):

Re: [PATCH 1/2] libstdc++: Add --enable-pure-stdio-libstdcxx option

2020-12-09 Thread Keith Packard via Gcc-patches
Jonathan Wakely writes: > OK. In principle, changes to avoid using the POSIX APIs are definitely > fine. I would like to combine your new configure switch with the > existing --enable-cstdio one though. > > How about the attached change for acinclude.m4 which would allow you > to do --enable-cstd

Re: RFC: ARM MVE and Neon auto-vectorization

2020-12-09 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > Hi, > > I've been working for a while on enabling auto-vectorization for ARM > MVE, and I find it a bit awkward to keep things common with Neon as > much as possible. > > I've just sent a few patches for logical operators > (vand/vorr/veor/vbic), and I hav

Re: [PATCH 1/2] libstdc++: Add --enable-pure-stdio-libstdcxx option

2020-12-09 Thread Jonathan Wakely via Gcc-patches
On 09/12/20 08:32 -0800, Keith Packard via Libstdc++ wrote: Jonathan Wakely writes: OK. In principle, changes to avoid using the POSIX APIs are definitely fine. I would like to combine your new configure switch with the existing --enable-cstdio one though. How about the attached change for ac

Re: Problem building libstdc++ for the avr target

2020-12-09 Thread Jonathan Wakely via Gcc-patches
On 09/12/20 12:49 +, Jonathan Wakely wrote: On 09/12/20 13:32 +0100, Vladimir V wrote: Hello. While testing with the current upstream I encountered a compilation issue. Although I build with "--disable-threads" flag the following error occurs: ../../../../../libstdc++-v3/src/c++11/thread.c

[PATCH,rs6000] Optimize pcrel access of globals [ping]

2020-12-09 Thread acsawdey--- via Gcc-patches
From: Aaron Sawdey Ping. I've folded in the changes to comments suggested by Will Schmidt. This patch implements a RTL pass that looks for pc-relative loads of the address of an external variable using the PCREL_GOT relocation and a single load or store that uses that external address. Produced

[[PATCH] 1/3] aarch64: Sanitize access to cfun in aarch64_declare_function_name()

2020-12-09 Thread Christoph Müllner
From: Christoph Muellner It is possible to call aarch64_declare_function_name() and have cfun not set. Let's sanitize the access to this variable. gcc/ * config/aarch64/aarch64.c (aarch64_declare_function_name): Santize access to cfun. --- gcc/config/aarch64/aarch64.c | 3 ++- 1 file c

[[PATCH] 2/3] aarch64: Add C-function invocation for indirect branch pattern.

2020-12-09 Thread Christoph Müllner
aarch64 already uses a C-function for indirect calls (aarch64_indirect_call_asm()). So let's add the same abstraction for indirect branches. This patch has no functional consequence. gcc/ * config/aarch64/aarch64.c (aarch64_indirect_branch_asm): Add function to output indirect bra

[[PATCH] 3/3] aarch64: Retpoline (Spectre-V2 mitigation) for aarch64.

2020-12-09 Thread Christoph Müllner
The compiler option -mindirect-branch= converts indirect branch-and-link-register and branch-register instructions according to . The default is ``keep``, which keeps indirect branch-and-link-register and branch-register instructions unmodified. ``thunk`` converts indirect branch-and-link-registe

Re: [PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

2020-12-09 Thread Kwok Cheung Yeung
Hello This is a further update of the patch for task detach support. - The memory for the event is not mapped on the target. This means that if omp_fulfill_event is called from an 'omp target' section with a target that does not share memory with the host, the event will not be fulfilled (and

Re: [PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

2020-12-09 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 09, 2020 at 05:37:24PM +, Kwok Cheung Yeung wrote: > I believe this patch is largely complete now. I have done a bootstrap on > x86_64 and run the testsuites with no regressions. I have also run the > libgomp testsuite with offloading to Nvidia and AMD GCN devices, also with > no re

Re: [PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

2020-12-09 Thread Kwok Cheung Yeung
On 09/12/2020 5:53 pm, Jakub Jelinek wrote: On Wed, Dec 09, 2020 at 05:37:24PM +, Kwok Cheung Yeung wrote: I believe this patch is largely complete now. I have done a bootstrap on x86_64 and run the testsuites with no regressions. I have also run the libgomp testsuite with offloading to Nvid

Re: [PATCH] Remove misleading debug line entries

2020-12-09 Thread Bernd Edlinger
On 12/8/20 7:57 PM, Bernd Edlinger wrote: > On 12/8/20 11:35 AM, Richard Biener wrote: >> >> + { >> + /* Remove a nonbind marker when the outer scope of the >> + inline function is completely removed. */ >> + if (gimple_debug_nonbind_marker_p (stmt) >> +

Re: [PATCH] C++ : Add the -stdlib= option.

2020-12-09 Thread Jason Merrill via Gcc-patches
On 11/11/20 3:58 PM, Iain Sandoe wrote: resending - the first & second attempt didn’t seem to make it to gcc-patches. Hi This option allows the user to specify alternate C++ runtime libraries, for example when a platform uses libc++ as the installed C++ runtime. It is the same spelling as a c

Re: [[PATCH] 2/3] aarch64: Add C-function invocation for indirect branch pattern.

2020-12-09 Thread Philipp Tomsich
Richard, Could you review this series and let us know if this is acceptable for Phase 3? This is a security-relevant (a Spectre variant 2 mitigation) for the Ampere eMAG… Thanks, Philipp. > On 09.12.2020, at 18:21, Christoph Müllner > wrote: > > aarch64 already uses a C-function for indirect

i386: Remove REG_ALLOC_ORDER definition

2020-12-09 Thread Uros Bizjak via Gcc-patches
REG_ALLOC_ORDER just defines what the default is set to. 2020-12-09 Uroš Bizjak gcc/ * config/i386/i386.h (REG_ALLOC_ORDER): Remove. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Pushed to master. Uros. diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index

c++: name-lookup cleanups

2020-12-09 Thread Nathan Sidwell
Name-lookup is the most changed piece of the front end for modules. Here are some preparatort cleanups and API extensions. gcc/cp/ * name-lookup.h (set_class_bindings): Return vector, take signed 'extra' parm. * name-lookup.c (maybe_lazily_declare): Break out ...

Re: GCC 10 backports

2020-12-09 Thread Martin Liška
On 10/16/20 10:51 AM, Martin Liška wrote: On 10/7/20 2:03 PM, Martin Liška wrote: On 10/1/20 9:18 PM, Martin Liška wrote: I'm going to install the following 3 tested backports. Martin One more patch that I've tested. Martin Adding one more. Martin Adding one more I've just tested. Mar

c++: Module-specific error and tree dumping

2020-12-09 Thread Nathan Sidwell
With modules, we need the ability to name 'foos' in different modules. The idiom for that is a trailing '@modulename' suffix. This adds that to the error printing routines. I also augment the tree dumping machinery to show module-specific metadata. gcc/cp/ * error.c (dump_module

[PATCH V2] RISC-V: Explicitly call python when using multilib generator

2020-12-09 Thread Simon Cook
On 09/12/2020 14:57, Matthias Klose wrote: > > that's again hard-coding 'python'. > I believe this way of invoking python should be better than just hardcoding python, instead using the interpreter that was called for the first script. -- >From 304afba63fb851fae461fcd8

Re: c++: Module-specific error and tree dumping

2020-12-09 Thread David Malcolm via Gcc-patches
On Wed, 2020-12-09 at 15:20 -0500, Nathan Sidwell wrote: > With modules, we need the ability to name 'foos' in different > modules. > The idiom for that is a trailing '@modulename' suffix. Out of curiosity, is this idiom shared with other compilers? (or in the standard) > This adds that > t

Re: c++: Module-specific error and tree dumping

2020-12-09 Thread Nathan Sidwell
On 12/9/20 3:41 PM, David Malcolm wrote: On Wed, 2020-12-09 at 15:20 -0500, Nathan Sidwell wrote: With modules, we need the ability to name 'foos' in different modules. The idiom for that is a trailing '@modulename' suffix. Out of curiosity, is this idiom shared with other compilers? (or in th

Re: [PATCH, rs6000] Update "size" attribute for Power10

2020-12-09 Thread will schmidt via Gcc-patches
On Tue, 2020-12-08 at 15:46 -0600, Pat Haugen via Gcc-patches wrote: > Update size attribute for Power10. > > > This patch was broken out from my larger patch to update various > attributes for > Power10, in order to make the review process hopefully easier. This > patch only > updates the size a

Re: c++: Module-specific error and tree dumping

2020-12-09 Thread David Malcolm via Gcc-patches
On Wed, 2020-12-09 at 16:07 -0500, Nathan Sidwell wrote: > On 12/9/20 3:41 PM, David Malcolm wrote: > > On Wed, 2020-12-09 at 15:20 -0500, Nathan Sidwell wrote: > > > With modules, we need the ability to name 'foos' in different > > > modules. > > > The idiom for that is a trailing '@modulename' su

RE: [PATCH][GCC] aarch64: Add +pauth to -march

2020-12-09 Thread Przemyslaw Wirkus via Gcc-patches
> > Subject: [PATCH][GCC] aarch64: Add +pauth to -march > > > > New +pauth (Pointer Authentication from Armv8.3-A) feature option for > > -march command line option. > > > > Please note that majority of PAUTH instructions are implemented behind > > HINT instruction. PAUTH stays a Armv8.3-A feature

Re: Problem building libstdc++ for the avr target

2020-12-09 Thread Vladimir V via Gcc-patches
Thank you for the quick response. The patch solves the problem. ср, 9 дек. 2020 г. в 18:01, Jonathan Wakely : > On 09/12/20 12:49 +, Jonathan Wakely wrote: > >On 09/12/20 13:32 +0100, Vladimir V wrote: > >>Hello. > >> > >>While testing with the current upstream I encountered a compilation > i

Re: [PATCH 1/8 v4] Dead-field warning in structs at LTO-time

2020-12-09 Thread Eric Gallager via Gcc-patches
On Fri, Dec 4, 2020 at 4:58 AM Erick Ochoa < erick.oc...@theobroma-systems.com> wrote: > > This commit includes the following components: > >Type-based escape analysis to determine structs that can be modified at >link-time. >Field access analysis to determine which fields are never re

Re: Go testsuite patch committed: Don't quote quoted parentheses

2020-12-09 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 9, 2020 at 2:39 AM Andreas Schwab wrote: > > This breaks make -C gcc check-go RUNTESTFLAGS="go-test.exp=chan.go": > > ERROR: tcl error sourcing > /opt/gcc/gcc-20201209/gcc/testsuite/go.test/go-test.exp. > ERROR: couldn't compile regular expre

Go testsuite patch committed: Recognize errorcheckdir -n

2020-12-09 Thread Ian Lance Taylor via Gcc-patches
This patch to go-test.exp recognizes errorcheckdir -n, as used by the updated bug345 test. The -n option is meaningful for the gc compiler, but irrelevant for gccgo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * go.test/go-test.exp (go-gc-tests): Recogn

Optimize combination of comparisons to dec+compare

2020-12-09 Thread Eugene Rozenfeld via Gcc-patches
This patch adds a pattern for optimizing x < y || x == XXX_MIN to x <= y-1 if y is an integer with TYPE_OVERFLOW_WRAPS. This fixes pr96674. Tested on x86_64-pc-linux-gnu. For this function bool f(unsigned a, unsigned b) { return (b == 0) | (a < b); } the code without the patch is test

Re: [PATCH] RISC-V: Explicitly call python when using multilib generator

2020-12-09 Thread Jim Wilson
On Wed, Dec 9, 2020 at 7:02 AM Jakub Jelinek via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > On Wed, Dec 09, 2020 at 03:57:51PM +0100, Matthias Klose wrote: > > On 12/9/20 3:03 PM, Simon Cook wrote: > > > When building GCC for RISC-V with the --with-multilib-generator option, > > > it may not

Re: Help with PR97872

2020-12-09 Thread Hongtao Liu via Gcc-patches
It seems better with your PR97872 fix on i386. Cat test.c typedef char v16qi __attribute__ ((vector_size(16))); v16qi f1(v16qi a, v16qi b) { return (a & b) != 0; } before f1(char __vector(16), char __vector(16)): pand %xmm1, %xmm0 pxor %xmm1, %xmm1 pcmpeqb %xmm1, %xmm0 pcmpeqd %xmm1, %xmm1 pand

Re: [PATCH V2] RISC-V: Explicitly call python when using multilib generator

2020-12-09 Thread Jim Wilson
On Wed, Dec 9, 2020 at 12:30 PM Simon Cook wrote: > I believe this way of invoking python should be better than just > hardcoding python, instead using the interpreter that was called for the > first script. > I'm not a python expert. I would suggest asking Kito to review the patch. Avoiding th

Re: [PATCH 00/31] VAX: Bring the port up to date (yes, MODE_CC conversion is included)

2020-12-09 Thread Paul Koning via Gcc-patches
> On Dec 9, 2020, at 9:06 AM, Maciej W. Rozycki wrote: > > On Sat, 28 Nov 2020, Paul Koning wrote: > >>> Hmm, I gather those systems are able to run some kind of BSD Unix: don't >>> they support the r-commands which would allow you to run DejaGNU testing >>> with a realistic environment PDP

Re: V3 [PATCH 0/2] Switch to a new section if the SECTION_RETAIN bit doesn't match

2020-12-09 Thread Jim Wilson
On Tue, Dec 8, 2020 at 4:51 AM H.J. Lu via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > When SECTION_RETAIN is used, definitions marked with used attribute and > unmarked definitions are placed in a section with the same name. Instead > of issue an error: > Have you tested glibc builds with t

Re: V3 [PATCH 0/2] Switch to a new section if the SECTION_RETAIN bit doesn't match

2020-12-09 Thread H.J. Lu via Gcc-patches
On Wed, Dec 9, 2020 at 6:08 PM Jim Wilson wrote: > > On Tue, Dec 8, 2020 at 4:51 AM H.J. Lu via Gcc-patches > wrote: >> >> When SECTION_RETAIN is used, definitions marked with used attribute and >> unmarked definitions are placed in a section with the same name. Instead >> of issue an error: >

Re: [PATCH V2] RISC-V: Explicitly call python when using multilib generator

2020-12-09 Thread Kito Cheng via Gcc-patches
Hi Simon: V2 version is LGTM, thanks! On Thu, Dec 10, 2020 at 4:31 AM Simon Cook wrote: > > > On 09/12/2020 14:57, Matthias Klose wrote: > > > > that's again hard-coding 'python'. > > > > I believe this way of invoking python should be better than just > hardcoding python, instead using the int

[PATCH 0/2] Support libc with stdio-only I/O in libstdc++

2020-12-09 Thread Keith Packard via Gcc-patches
The current libstdc++ basic_file_stdio.cc code assumes a POSIX API underneath the stdio implementation provided by the host libc. This means that the host must provide a fairly broad POSIX file API, including read, write, open, close, lseek and ioctl. This patch changes basic_file_stdio.cc to only

[PATCH 2/2] Regenerate libstdc++-v3 autoconf files

2020-12-09 Thread Keith Packard via Gcc-patches
These are the changes to autoconf files for the stdio_pure patch Signed-off-by: Keith Packard --- libstdc++-v3/config.h.in | 3 +++ libstdc++-v3/configure | 17 - 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.i

[PATCH 1/2] libstdc++: Add --enable-stdio=stdio_pure option [v2]

2020-12-09 Thread Keith Packard via Gcc-patches
This option directs the library to only use simple stdio APIs instead of using fileno to get the file descriptor for use with POSIX APIs. Aided-by: Jonathan Wakely Signed-off-by: Keith Packard - v2: Switch from --enable-libstdcxx-pure-stdio to --enable-stdio=stdio_pure base

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

2020-12-09 Thread Ian Lance Taylor via Gcc-patches
On Tue, Dec 8, 2020 at 2:57 PM Nikhil Benesch wrote: > > This patch corrects -fdump-go-spec's handling of incomplete types. > To my knowledge the issue fixed here has not been previously > reported. It was exposed by an in-progress port of gccgo to FreeBSD. > > Given the following C code > >

[PATCH] Add missing varasm DECL_P check.

2020-12-09 Thread Jim Wilson
This fixes a riscv64-linux bootstrap failure. get_constant_section calls the select_section target hook, and select_section calls get_named_section which calls get_section. So it is possible to have a constant not a decl in both of these functions. They already call DECL_P checks everywhere exce

Re: V3 [PATCH 0/2] Switch to a new section if the SECTION_RETAIN bit doesn't match

2020-12-09 Thread Jim Wilson
On Wed, Dec 9, 2020 at 6:14 PM H.J. Lu wrote: > I tested it with glibc build. Glibc build issue is the reason I > didn't combine 2 patches into one. > If GCC does issue a warning, which it should, we will change glibc. > OK. Thanks. Then I won't worry about this glibc for now. Jim

Re: [PATCH] Add missing varasm DECL_P check.

2020-12-09 Thread H.J. Lu via Gcc-patches
On Wed, Dec 9, 2020 at 7:10 PM Jim Wilson wrote: > > This fixes a riscv64-linux bootstrap failure. > > get_constant_section calls the select_section target hook, and select_section > calls get_named_section which calls get_section. So it is possible to have > a constant not a decl in both of thes

Re: [PATCH 3/4] rs6000: Enable vec_insert for P8 with rs6000_expand_vector_set_var_p8

2020-12-09 Thread Xionghu Luo via Gcc-patches
Ping^2. Thanks. On 2020/12/3 22:16, Xionghu Luo via Gcc-patches wrote: Ping. Thanks. On 2020/11/27 09:04, Xionghu Luo via Gcc-patches wrote: Hi Segher, Thanks for the approval of [PATCH 1/4] and [PATCH 2/4], what's your opinion of this [PATCH 3/4] for P8, please?  xxinsertw only exists since

[PATCH] X86: Fix feature check for HRESET/AVX_VNNI/UINTR

2020-12-09 Thread Hongyu Wang via Gcc-patches
Hi, This patch is a simple fix for HRESET/AVX_VNNI/UINTR feature detect is put wrongly under avx_512usable. Bootstrap and tested on x86-64-linux, OK for trunk? gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Move check for HRESET/AVX_VNNI/UINTR out of avx512_usabl

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

2020-12-09 Thread Dimitar Dimitrov
On сряда, 9 декември 2020 г. 15:12:49 EET abebeos via Gcc-patches wrote: > Essence: > > I need a confirmation that the testsuite setup as presented in: > > https://github.com/abebeos/avr-gnu > > works fine. > > The problem with the avr target is that the testsuite cannot be run easily, > mainly

Re: [PATCH] Add missing varasm DECL_P check.

2020-12-09 Thread Jim Wilson
On Wed, Dec 9, 2020 at 7:14 PM H.J. Lu wrote: > A testcase? > A testcase requires the RISC-V select_section target hook, so it isn't going to be very useful. I don't see any other linux targets that have this hook defined. Just a few embedded targets. The testcase is libgfortran/generated/pr

Re: [PATCH] X86: Fix feature check for HRESET/AVX_VNNI/UINTR

2020-12-09 Thread Uros Bizjak via Gcc-patches
On Thu, Dec 10, 2020 at 4:42 AM Hongyu Wang wrote: > > Hi, > > This patch is a simple fix for HRESET/AVX_VNNI/UINTR feature detect is > put wrongly under avx_512usable. > > Bootstrap and tested on x86-64-linux, OK for trunk? > > gcc/ChangeLog: > * common/config/i386/cpuinfo.h (get_available_fe