Re: [PATCH] PR tree-optimization/31178 - Add rshift side effect.

2022-05-18 Thread Richard Biener via Gcc-patches
On Wed, May 18, 2022 at 3:16 PM Andrew MacLeod wrote: > > On 5/18/22 02:41, Richard Biener wrote: > > On Tue, May 17, 2022 at 8:41 PM Andrew MacLeod via Gcc-patches > > wrote: > >> This patch implements side effects of the second operand of a shift > >> operation. > >> > >> given A >> B or A <<

Go patch committed: Traverse expressions with exporting consts

2022-05-18 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend by Julia Lapenko traverses expressions when exporting constants. When exporting a constant A that is expressed through a constant B from another package, it is necessary to traverse an expression representing the constant A to generate a sequence of type casts from

Re: [PATCH] middle-end/105604 - snprintf dianostics and non-constant sizes/offsets

2022-05-18 Thread Martin Sebor via Gcc-patches
On 5/18/22 00:26, Richard Biener wrote: On Tue, 17 May 2022, Martin Sebor wrote: On 5/16/22 03:16, Richard Biener wrote: The following tries to correct get_origin_and_offset_r not handling non-constant sizes of array elements in ARRAY_REFs and non-constant offsets of COMPONENT_REFs. It isn't

Re: [PATCH v3] c: Implement new -Wenum-int-mismatch warning [PR105131]

2022-05-18 Thread Joseph Myers
On Wed, 18 May 2022, Marek Polacek via Gcc-patches wrote: > I've extended the tests to use an enum with __attribute__ ((__packed__)) to > test the case when the underlying type is (un)signed char. But it seems like > we can't have underlying types wider than int. I've also included two tests >

Re: [PATCH] testsuite: add missing dg-require-effective-target fpic

2022-05-18 Thread Mike Stump via Gcc-patches
Ok. On May 5, 2022, at 2:35 AM, Marc Poulhies via Gcc-patches wrote: > > Marc Poulhiès writes: > >> Require effective target fpic for newly added test. >> >> gcc/testsuite/ >> * g++.dg/ext/visibility/visibility-local-extern1.C: Add missing >> dg-require-effective-target fpic. >>

[PATCH v3] c: Implement new -Wenum-int-mismatch warning [PR105131]

2022-05-18 Thread Marek Polacek via Gcc-patches
On Wed, May 18, 2022 at 08:58:02PM +, Joseph Myers wrote: > On Wed, 18 May 2022, Marek Polacek via Gcc-patches wrote: > > > diff --git a/gcc/testsuite/gcc.dg/Wenum-int-mismatch-1.c > > b/gcc/testsuite/gcc.dg/Wenum-int-mismatch-1.c > > new file mode 100644 > > index 000..f71a308bc19 >

Re: [PATCH] Modula-2: merge proposal/review: 7/9 07.patch-set-05

2022-05-18 Thread Joseph Myers
On Wed, 18 May 2022, Gaius Mulley via Gcc-patches wrote: > /* This is the contribution to the `documented_lang_options' array in >toplev.c for gm2. */ I'm not sure what this is (an unused file?), but documented_lang_options was removed in 2003. And in general, comments referring to .c

Re: [PATCH v2] c: Implement new -Wenum-int-mismatch warning [PR105131]

2022-05-18 Thread Joseph Myers
On Wed, 18 May 2022, Marek Polacek via Gcc-patches wrote: > diff --git a/gcc/testsuite/gcc.dg/Wenum-int-mismatch-1.c > b/gcc/testsuite/gcc.dg/Wenum-int-mismatch-1.c > new file mode 100644 > index 000..f71a308bc19 > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/Wenum-int-mismatch-1.c > @@

[PATCH COMMITTED] Revert move of g++.dg/pr69667.C

2022-05-18 Thread Paul A. Clarke via Gcc-patches
Commit eccbd7fcee5bbfc47731e8de83c44eee2e3dcc4b moved the subject file to g++.target/powerpc. Unfortunately, test g++.dg/tsan/pr88018.C includes "../pr69667.C". Revert the move of this file. Commit 14e678a2c4a76433fd4029568d28530c921e11ee relaxed some DejaGnu directives in

Re: [PATCH] Add divide by zero side effect.

2022-05-18 Thread Segher Boessenkool
On Wed, May 18, 2022 at 04:24:06PM -0400, Andrew MacLeod wrote: > On 5/18/22 14:13, Segher Boessenkool wrote: > >"Side effect" already has a meaning, very commonly used in language > >theory, and even in the C standard itself: a function has a side effect > >if it does something more than just

[PATCH] Modula-2: merge proposal/review: 2/9 02.patch-set-02 v2

2022-05-18 Thread Gaius Mulley via Gcc-patches
Hello, this email contains v2: 2. the top level /gm2tools contents. - New file: ./ChangeLog - 2022-05-18 Gaius Mulley * gm2l.1: Corrected default implementation/program module extension to .mod. * m2color.c:

Re: [PATCH] Add divide by zero side effect.

2022-05-18 Thread Andrew MacLeod via Gcc-patches
On 5/18/22 14:13, Segher Boessenkool wrote: On Tue, May 17, 2022 at 02:39:11PM -0400, Andrew MacLeod via Gcc-patches wrote: I haven't checked this patch in yet.  This implements a side effect that the divisor cannot be 0 after a divide executes. This allows us to fold the divide away: "Side

Re: [PATCH] Delay splitting addti3/subti3 until first split pass.

2022-05-18 Thread Michael Meissner via Gcc-patches
On Fri, May 13, 2022 at 12:32:22PM -0500, Segher Boessenkool wrote: > On Fri, May 13, 2022 at 11:08:48AM -0400, Michael Meissner wrote: > > Add zero_extendditi2. Improve lxvr*x code generation. > > > > Nothing in this pass haas anything to do with the subject. Which is a > good thing, because

Re: [PATCH] Add divide by zero side effect.

2022-05-18 Thread Segher Boessenkool
On Tue, May 17, 2022 at 02:39:11PM -0400, Andrew MacLeod via Gcc-patches wrote: > I haven't checked this patch in yet.  This implements a side effect that > the divisor cannot be 0 after a divide executes. This allows us to fold > the divide away: "Side effect" already has a meaning, very

Re: [PATCH] Optimize multiply/add of DImode extended to TImode, PR target/103109.

2022-05-18 Thread will schmidt via Gcc-patches
On Tue, 2022-05-17 at 23:15 -0400, Michael Meissner wrote: > On Fri, May 13, 2022 at 01:20:30PM -0500, will schmidt wrote: > > On Fri, 2022-05-13 at 12:17 -0400, Michael Meissner wrote: > > > > > > > > > gcc/ > > > PR target/103109 > > > * config/rs6000/rs6000.md (su_int32): New code

[x86 PATCH] Some additional ix86_rtx_costs clean-ups: NEG, AND and pandn.

2022-05-18 Thread Roger Sayle
Hi Uros, Very many thanks for the speedy review and approval of my ix86_rtx_costs patch to correct the cost of multi-word multiplications. In the same spirit, this patch tidies up a few additional nits I noticed while there: Multi-word NOT requires two operations, but multi-word NEG requires

Re: [PATCH v2] x86: Document -mcet-switch

2022-05-18 Thread H.J. Lu via Gcc-patches
On Wed, May 11, 2022 at 1:52 PM H.J. Lu wrote: > > When -fcf-protection=branch is used, the compiler will generate jump > tables for switch statements where the indirect jump is prefixed with > the NOTRACK prefix, so it can jump to non-ENDBR targets. Since the > indirect jump targets are

[PATCH take #2] PR middle-end/98865: Expand X*Y as X&-Y when Y is [0.1].

2022-05-18 Thread Roger Sayle
The patch is a revised solution for PR middle-end/98865 incorporating the feedback/suggestions from Richard Biener's review here: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/593928.html Most significantly, this patch now performs the transformation/optimization during RTL expansion, where

[r13-456 Regression] FAIL: g++.dg/tsan/pr88018.C -O0 (test for excess errors) on Linux/x86_64

2022-05-18 Thread skpandey--- via Gcc-patches
On Linux/x86_64, eccbd7fcee5bbfc47731e8de83c44eee2e3dcc4b is the first bad commit commit eccbd7fcee5bbfc47731e8de83c44eee2e3dcc4b Author: Paul A. Clarke Date: Mon Feb 21 12:14:01 2022 -0600 rs6000: Move g++.dg powerpc PR tests to g++.target caused FAIL: g++.dg/tsan/pr88018.C -O0

[PATCH v2] c: Implement new -Wenum-int-mismatch warning [PR105131]

2022-05-18 Thread Marek Polacek via Gcc-patches
On Wed, May 18, 2022 at 11:14:25AM +0100, Pedro Alves wrote: > On 2022-05-18 00:56, Marek Polacek via Gcc-patches wrote: > > > +In C, an enumerated type is compatible with @code{char}, a signed > > +integer type, or an unsigned integer type. However, since the choice > > +of the underlying type

Re: [committed] d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01.

2022-05-18 Thread Rainer Orth
Hi Iain, > Upstream dmd has now released v2.100.0, this patch merges in the > latest bug fixes since the last sync-up of the release branch, as well > as all new feature changes on development branch. [...] > D runtime changes: > > - Import druntime v2.100.0. > > Bootstrapped and regression

[c-family] Reduce usage of limited_with clauses with -fdump-ada-spec

2022-05-18 Thread Eric Botcazou via Gcc-patches
The problem is that subtypes are not part of the limited view of a package so we need to use types in conjunction with limited_with clauses, which is not always desirable since this yields less portable Ada bindings. The patch also contains a small enhancement for complex floating-point types.

Re: [PATCH] c++: fix SIGFPE with -Wclass-memaccess [PR105634]

2022-05-18 Thread Jason Merrill via Gcc-patches
On 5/17/22 19:57, Marek Polacek wrote: Here we crash because we attempt to % by 0. Thus fixed. While at it, I've moved the -Wclass-memaccess tests into warn/. I've checked that the # of expected passes is the same before/after the move. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for

Re: [PATCH v3] c, c++: -Wswitch warning on [[maybe_unused]] enumerator [PR105497]

2022-05-18 Thread Jason Merrill via Gcc-patches
On 5/17/22 19:55, Marek Polacek wrote: On Tue, May 10, 2022 at 09:54:12AM -0400, Marek Polacek wrote: On Tue, May 10, 2022 at 08:58:46AM -0400, Jason Merrill wrote: On 5/7/22 18:26, Marek Polacek wrote: Corrected version that avoids an uninitialized warning: This PR complains that we emit

Re: [PATCH] c++: constexpr init of union sub-aggr w/ base [PR105491]

2022-05-18 Thread Jason Merrill via Gcc-patches
On 5/17/22 12:34, Patrick Palka wrote: On Sat, May 7, 2022 at 5:18 PM Jason Merrill wrote: On 5/6/22 16:46, Patrick Palka wrote: On Fri, 6 May 2022, Jason Merrill wrote: On 5/6/22 16:10, Patrick Palka wrote: On Fri, 6 May 2022, Patrick Palka wrote: On Fri, 6 May 2022, Jason Merrill

[PATCH, committed] testsuite/rs6000: Move pr83660.C to g++.target

2022-05-18 Thread Kewen.Lin via Gcc-patches
Hi, Move pr83660.C to g++.target. As comment #3 of PR83660, renaming it to c isn't one option. This test case isn't tested before, so this brings back the test coverage. Committed as r13-619-g297a69068ddfe2. BR, Kewen - gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr83660.C:

Re: [PATCH] c++: set TYPE_CANONICAL for most templated types

2022-05-18 Thread Jason Merrill via Gcc-patches
On 5/16/22 15:58, Patrick Palka wrote: When processing a class template specialization, lookup_template_class uses structural equality for the specialized type whenever one of its template arguments uses structural equality. This the sensible thing to do in a vacuum, but given that we already

[PATCH v3] rs6000: Adjust mov optabs for opaque modes [PR103353]

2022-05-18 Thread Kewen.Lin via Gcc-patches
Hi, As PR103353 shows, we may want to continue to expand a MMA built-in function like a normal function, even if we have already emitted error messages about some missing required conditions. As shown in that PR, without one explicit mov optab on OOmode provided, it would call emit_move_insn

[PATCH v3] rs6000: Fix the check of bif argument number [PR104482]

2022-05-18 Thread Kewen.Lin via Gcc-patches
Hi, As PR104482 shown, it's one regression about the handlings when the argument number is more than the one of built-in function prototype. The new bif support only catches the case that the argument number is less than the one of function prototype, but it misses the case that the argument

[PATCH] Modula-2: merge proposal/review: 9/9 09.patch-set-07

2022-05-18 Thread Gaius Mulley via Gcc-patches
Hello, this file contains: 7. gcc/doc/gm2.texi == - New file: gcc/doc/gm2.texi - \input texinfo @c -*-texinfo-*- @c Copyright (C) 2001-2022 Free Software Foundation, Inc. @c This is part of the GM2

[PATCH] Modula-2: merge proposal/review: 8/9 08.patch-set-06

2022-05-18 Thread Gaius Mulley via Gcc-patches
Hello, this file contains: 6. gcc/m2/Make-lang.in == - New file: gcc/m2/Make-lang.in - # Top level -*- makefile -*- fragment for GNU M2. # Copyright (C) 2000-2022 Free Software Foundation, Inc.

[PATCH] Modula-2: merge proposal/review: 6/9 06.patch-set-04-3

2022-05-18 Thread Gaius Mulley via Gcc-patches
Hello, this email contains: 4. the glue code (between Modula-2 and GCC) part 3/3. (*.def files). New file: gcc/m2/gm2-gcc/README This directory contains the interface code between the Modula-2 front end and GCC. In effect this is the

[PATCH] Modula-2: merge proposal/review: 1/9 01.patch-set-01

2022-05-18 Thread Gaius Mulley via Gcc-patches
hello, this file is part-01 of the patch set for the gm2 review. 1. all GCC files which have been patched. == The 'Only in' diff output was: Only in gcc-git-devel-modula2/gcc: m2 Only in gcc-git-devel-modula2/gcc/testsuite: gm2 Only in

[PATCH] Modula-2: merge proposal/review: 2/9 02.patch-set-02

2022-05-18 Thread Gaius Mulley via Gcc-patches
Hello, this email contains: 2. the top level /gm2tools contents. --- New file: gm2tools/autogen.sh --- #!/bin/sh # autogen.sh regenerate the autoconf files. # Copyright 2013-2022 Free Software Foundation, Inc. # # This

Re: [PATCH] c++: suppress -Waddress warnings with *_cast [PR105569]

2022-05-18 Thread Jason Merrill via Gcc-patches
On 5/16/22 13:06, Marek Polacek wrote: dynamic_cast can legally return nullptr, so I don't think it's helpful for -Waddress to warn for if (dynamic_cast()) // ... More generally, it's likely not useful to warn for the artificial POINTER_PLUS_EXPRs created by build_base_path. Normally

Re: [PATCH] Add divide by zero side effect.

2022-05-18 Thread Andrew MacLeod via Gcc-patches
On 5/18/22 02:28, Richard Biener wrote: On Tue, May 17, 2022 at 8:40 PM Andrew MacLeod via Gcc-patches wrote: I haven't checked this patch in yet. This implements a side effect that the divisor cannot be 0 after a divide executes. This allows us to fold the divide away: a = b / c; if (c ==

Re: [PATCH] PR tree-optimization/31178 - Add rshift side effect.

2022-05-18 Thread Andrew MacLeod via Gcc-patches
On 5/18/22 02:41, Richard Biener wrote: On Tue, May 17, 2022 at 8:41 PM Andrew MacLeod via Gcc-patches wrote: This patch implements side effects of the second operand of a shift operation. given A >> B or A << B, the range of B is restricted to [0, PRECISION_A). Fortran is currently more

Re: [PATCH] libgompd: Add OMPD support and global ICV functions

2022-05-18 Thread Mohamed Atef via Gcc-patches
Hi Jakub, Sorry for the rush of emails, I removed the Copyright part, I will use DCO. Note: I filled out the form. On Wed, May 18, 2022 at 2:55 PM Mohamed Atef wrote: > > > On Wed, May 18, 2022 at 2:43 PM Jakub Jelinek wrote: > >> On Wed, May 18, 2022 at 02:10:29PM +0200, Mohamed Atef

Re: [PATCH] libgompd: Add OMPD support and global ICV functions

2022-05-18 Thread Mohamed Atef via Gcc-patches
On Wed, May 18, 2022 at 2:43 PM Jakub Jelinek wrote: > On Wed, May 18, 2022 at 02:10:29PM +0200, Mohamed Atef wrote: > > > As I said earlier, as this is just partial implementation of the > > > OMPD, I think it would be better to commit it to a git branch but > > > already in the upstream

Re: [PATCH] libgompd: Add OMPD support and global ICV functions

2022-05-18 Thread Jakub Jelinek via Gcc-patches
On Wed, May 18, 2022 at 02:10:29PM +0200, Mohamed Atef wrote: > > As I said earlier, as this is just partial implementation of the > > OMPD, I think it would be better to commit it to a git branch but > > already in the upstream repository, say devel/omp/ompd branch. > > > > Do you have a FSF

Re: [PATCH] libgompd: Add OMPD support and global ICV functions

2022-05-18 Thread Mohamed Atef via Gcc-patches
Hi Jakub, This is the final patch. I fixed things that you mentioned. I added two more small functions at ompd-helper.c. One more thing, the functions in ompd-helper.c are very similar. I can try to make them generic to a single function but, I think it's better to get the value of every ICV by

Re: [PATCH 15/40] graphite: Extend SCoP detection dump output

2022-05-18 Thread Richard Biener via Gcc-patches
On Wed, 18 May 2022, Harwath, Frederik wrote: > Hi Richard, > > On Tue, 2022-05-17 at 08:21 +, Richard Biener wrote: > > On Mon, 16 May 2022, Tobias Burnus wrote: > > > > > As requested by Richard: Rediffed patch. > > > > > > Changes: s/.c/.cc/ + some whitespace changes. > > > (At least in

Re: [PATCH 15/40] graphite: Extend SCoP detection dump output

2022-05-18 Thread Harwath, Frederik
Hi Richard, On Tue, 2022-05-17 at 08:21 +, Richard Biener wrote: > On Mon, 16 May 2022, Tobias Burnus wrote: > > > As requested by Richard: Rediffed patch. > > > > Changes: s/.c/.cc/ + some whitespace changes. > > (At least in my email reader, some were lost. I also fixed > > too-long line >

Re: [PATCH] libgompd: Add OMPD support and global ICV functions

2022-05-18 Thread Mohamed Atef via Gcc-patches
On Wed, May 18, 2022 at 9:35 AM Jakub Jelinek wrote: > On Mon, May 16, 2022 at 07:35:17PM +0200, Mohamed Atef via Gcc-patches > wrote: > > libgomp/ChangeLog > > > > 2022-05-15 Mohamed Atef > > > > *config/darwin/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. > > *config/hpux/plugin-suffix.h

Re: [2/9] ARM changes to adjust vec_perm_const hook

2022-05-18 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni via Gcc-patches writes: > Hi, > The attached patch adjusts vec_perm_const hook to accommodate the new > parameter. > For rationale, please see: > https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html > OK to commit if bootstrap+test passes ? > > Thanks, > Prathamesh

Re: [1/9] AArch64 changes to adjust vec_perm_const hook

2022-05-18 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > Hi, > The attached patch adjusts vec_perm_const hook to accommodate the new > parameter. > For now, it bails out if vmode != op_mode, in follow-up patch to > PR96463, I will add dup > as exception. > Bootstrapped+tested on aarch64-linux-gnu. > Does it look OK ? OK,

Re: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-18 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > Hi, > The attached patch adds another parameter machine_mode op_mode to > vec_perm_const > hook to specify mode of input operands. The motivation for doing this > is PR96463, > where we create vec_perm_expr of the form: > lhs = vec_perm_expr > where lhs and rhs have

demangler: Reorganize for module demangling

2022-05-18 Thread Nathan Sidwell
Module demangling requires some changes in how substitutions are handled. This adjusts things to make that possible, these are similar changes to that made in the the llvm demangler. nathan -- Nathan SidwellFrom 65851d65fb36e847a9b8ef3b0519f06d29865a14 Mon Sep 17 00:00:00 2001 From: Nathan

[8/9] s390 changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Unfortunately, I am not sure how to cross test this patch. make all-gcc stage-1 seems to build fine. Is it OK to commit

[7/9] ia64 changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Unfortunately, I am not sure how to cross test this patch. make all-gcc stage-1 seems to build fine. Is it OK to commit

[6/9] sparc changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Unfortunately, I am not sure how to cross test this patch. make all-gcc stage-1 seems to build fine. Is it OK to commit

[5/9] mips changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Unfortunately, I am not sure how to cross test this patch. make all-gcc stage-1 seems to build fine. Is it OK to commit

[4/9] rs6000 changes to vec_perm_const hook.

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html OK to commit if bootstrap+test passes ? Thanks, Prathamesh diff --git a/gcc/config/rs6000/rs6000.cc

[3/9] i386 changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html Bootstrapped+tested on x86_64-linux-gnu. OK to commit ? Thanks, Prathamesh diff --git a/gcc/config/i386/i386-expand.cc

[2/9] ARM changes to adjust vec_perm_const hook

2022-05-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch adjusts vec_perm_const hook to accommodate the new parameter. For rationale, please see: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595128.html OK to commit if bootstrap+test passes ? Thanks, Prathamesh diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc

Re: [PATCH] i386: Add a constraint for absolute symboilc address [PR 105576]

2022-05-18 Thread Hongyu Wang via Gcc-patches
> -fpic will break compilation with "i" constraint. Ah, yes. But "X" is like no constraint, shouldn't we provide something similar to "S" in aarch64 and riscv? I think it is better to constrain the operand to constant symbols rather than allowing everything. Uros Bizjak 于2022年5月18日周三 18:18写道: >

Re: [PATCH] i386: Add a constraint for absolute symboilc address [PR 105576]

2022-05-18 Thread Uros Bizjak via Gcc-patches
On Wed, May 18, 2022 at 12:14 PM Hongyu Wang wrote: > > Oh, I just found that asm ("%p0" :: "i"(addr)); also works on > -mcmodel=large in this case, please ignore this patch. Thanks. -fpic will break compilation with "i" constraint. Uros. > > Uros Bizjak via Gcc-patches 于2022年5月18日周三 17:46写道:

Re: [PATCH] i386: Add a constraint for absolute symboilc address [PR 105576]

2022-05-18 Thread Hongyu Wang via Gcc-patches
Oh, I just found that asm ("%p0" :: "i"(addr)); also works on -mcmodel=large in this case, please ignore this patch. Thanks. Uros Bizjak via Gcc-patches 于2022年5月18日周三 17:46写道: > > On Wed, May 18, 2022 at 9:32 AM Hongyu Wang wrote: > > > > Hi, > > > > This patch adds a constraint "Ws" to allow

Re: [PATCH] c: Implement new -Wenum-int-mismatch warning [PR105131]

2022-05-18 Thread Pedro Alves
On 2022-05-18 00:56, Marek Polacek via Gcc-patches wrote: > +In C, an enumerated type is compatible with @code{char}, a signed > +integer type, or an unsigned integer type. However, since the choice > +of the underlying type of an enumerated type is implementation-defined, > +such mismatches may

'include/cuda/cuda.h': Add parts necessary for nvptx-tools 'nvptx-run' (was: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches))

2022-05-18 Thread Thomas Schwinge
Hi! On 2017-01-13T19:11:23+0100, Jakub Jelinek wrote: > cuda.h header included > in this patch In order to be able to use that file without changes for nvptx-tools 'nvptx-run', I've pushed to GCC master branch commit 86f64400a5692499856d41462461327b93f82b8d "'include/cuda/cuda.h': Add parts

'include/cuda/cuda.h': For C++, wrap in 'extern "C"' (was: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches))

2022-05-18 Thread Thomas Schwinge
Hi! On 2017-01-13T19:11:23+0100, Jakub Jelinek wrote: > cuda.h header included > in this patch To make this '#include'able in C++ code, I've pushed to master branch commit bdd1dc1bfbe1492edf3ce5e4288cfbc55be329ab "'include/cuda/cuda.h': For C++, wrap in 'extern "C"'", see attached. Grüße

Re: [PATCH] i386: Add a constraint for absolute symboilc address [PR 105576]

2022-05-18 Thread Uros Bizjak via Gcc-patches
On Wed, May 18, 2022 at 9:32 AM Hongyu Wang wrote: > > Hi, > > This patch adds a constraint "Ws" to allow absolute symbolic address for > either > function or variable. This also works under -mcmodel=large. > > Bootstrapped/regtested on x86_64-pc-linux-gnu{-m32,} > > Ok for master? Maybe you

Re: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-18 Thread Andre Vieira (lists) via Gcc-patches
Hi Prathamesh, I am just looking at this as it interacts with a change I am trying to make, but I'm not a reviewer so take my comments with a pinch of salt ;) I copied in bits of your patch below to comment. > -@deftypefn {Target Hook} bool TARGET_VECTORIZE_VEC_PERM_CONST (machine_mode

Re: [Patch] OpenMP: Add Fortran support for inoutset depend-kind (was: openmp: Add support for inoutset depend-kind)

2022-05-18 Thread Jakub Jelinek via Gcc-patches
On Wed, May 18, 2022 at 11:02:27AM +0200, Tobias Burnus wrote: > OpenMP: Add Fortran support for inoutset depend-kind > > Fortran additions to the C/C++ + ME/libgomp commit > r13-556-g2c16eb3157f86ae561468c540caf8eb326106b5f > > gcc/fortran/ChangeLog: > > * gfortran.h (enum

Re: [x86 PATCH] Correct ix86_rtx_cost for multi-word multiplication.

2022-05-18 Thread Uros Bizjak via Gcc-patches
On Tue, May 17, 2022 at 6:44 PM Roger Sayle wrote: > > > This is the i386 backend specific piece of my revised patch for > PR middle-end/98865, where Richard Biener has suggested that I perform > the desired transformation during RTL expansion where the backend can > control whether it is

Re: [x86 PATCH take 2] Avoid andn and generate shorter not; and with -Oz.

2022-05-18 Thread Uros Bizjak via Gcc-patches
On Tue, May 17, 2022 at 5:52 PM Roger Sayle wrote: > > > This is a revised version of my i386 backend patch to avoid andn with -Oz, > when an explicit not;and (or not;test) would be (one byte) shorter. > https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593168.html > This revision incorporates

Re: PING: [PATCH v2] x86: Fix -fsplit-stack feature detection via TARGET_CAN_SPLIT_STACK

2022-05-18 Thread Uros Bizjak via Gcc-patches
On Wed, May 18, 2022 at 9:34 AM Sören Tempel wrote: > > Hi, > > Uros Bizjak wrote: > > > > > gcc/ChangeLog: > > > > > > > > > > * config/i386/gnu-user-common.h (defined): Only define > > > > > TARGET_CAN_SPLIT_STACK for glibc targets. > > > > > * config/i386/gnu.h (defined):

[Patch] OpenMP: Add Fortran support for inoutset depend-kind (was: openmp: Add support for inoutset depend-kind)

2022-05-18 Thread Tobias Burnus
On 17.05.22 15:55, Jakub Jelinek via Gcc-patches wrote: This patch adds support for inoutset depend-kind in depend clauses. While this patch adds the Fortran FE bits and converts the C/C++ testcase changes for Fortran. Bootstrapped/regtested on x86_64-linux. OK for trunk? Tobias

[PATCH v3, rs6000] Implemented f[min/max]_optab by xs[min/max]dp [PR103605]

2022-05-18 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch implements optab f[min/max]_optab by xs[min/max]dp on rs6000. Tests show that outputs of xs[min/max]dp are consistent with the standard of C99 fmin/max. This patch also binds __builtin_vsx_xs[min/max]dp to fmin/max instead of smin/max. So the builtins always generate

[Ada] arm-qnx-7.1: stack-checking and sigtramp implementation

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Rewrite and base on VxWorks RTP implementation. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sigtramp-arm-qnx.c: Rewrite.diff --git a/gcc/ada/sigtramp-arm-qnx.c b/gcc/ada/sigtramp-arm-qnx.c --- a/gcc/ada/sigtramp-arm-qnx.c +++ b/gcc/ada/sigtramp-arm-qnx.c @@ -6,7 +6,7 @@

[Ada] Adapt proof of double arithmetic runtime unit

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
After changes in Why3 and generation of VCs, ghost code needs to be adapted for proofs to remain automatic. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-aridou.adb (Big3): Change return type. (Lemma_Mult_Non_Negative, Lemma_Mult_Non_Positive): Reorder

[Ada] Fix proof of runtime unit s-imageu

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Update to provers caused some proof regressions. Fix the proof by adding an assertion. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-imageu.adb (Set_Image_Unsigned): Change assertion.diff --git a/gcc/ada/libgnat/s-imageu.adb b/gcc/ada/libgnat/s-imageu.adb ---

[Ada] qnx-7.1: warning in sigtramp-qnx.c __gnat_sigtramp

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Fix compilation warning. The code was using a cast to struct sigcontext *, which doesn't exist. It worked by accident. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sigtramp-qnx.c: Change struct sigcontext * to mcontext_t *.diff --git a/gcc/ada/sigtramp-qnx.c

[Ada] Disable Vet calls when container checks are disabled

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Calls to various Vet functions are used throughout the containers packages to check internal consistency. This patch improves efficiency by disabling these calls when Container_Checks are suppressed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-crbtgo.ads,

[Ada] Fix proof of runtime unit s-valeu

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Update to provers caused some proof regressions. Fix the proof by changing ghost code. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-valueu.adb (Scan_Raw_Unsigned): Add assertions.diff --git a/gcc/ada/libgnat/s-valueu.adb b/gcc/ada/libgnat/s-valueu.adb ---

[Ada] arm-qnx-7.1: undefined reference to fma* symbols

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Configure the arm-qnx runtime packages to avoid generating these symbols. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl (arm-qnx): Use default (non-fma) target pair.diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl --- a/gcc/ada/Makefile.rtl +++

[Ada] Fix DWARF parsing for 32-bit targets on 64-bit hosts

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Currently, a 64-bit gnatsymbolize fails to output line numbers and accurate symbol names when run on 32-bit executables (and vice-versa). This is because a couple of spots in System.Dwarf_Lines expect the Address_Size found in the DWARF data to match the host Address'Size. This patch corrects

[Ada] Improve error messages for occurrence of GNAT extensions without -gnatX

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
The error message issued for use of GNAT extension features without specifying -gnatX (or pragma Extensions_Allowed) was confusing in the presence of a pragma specifying a language version (such as "pragma Ada_2022;"), because the pragma supersedes the switch. The message is improved by testing

[Ada] Fix Ada-QNX task priority conversion

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
The conversion between OS and Ada priorties should be done in the wider Interfaces.C.int type rather than Any_Priority otherwise Constraint_Error will be raised when coverting Any_Priority'Last to int. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Use specific predicate before manipulating BIP_Alloc_Form

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
For the sake of consistency with other similar manipulations. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Use Needs_BIP_Alloc_Form.diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb --- a/gcc/ada/exp_ch7.adb +++

[Ada] Crash building VSS with compiler built with assertions

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
When a tagged type T has aspect String_Literal, a derived type defines a null extension T2, and the context to resolve the use of an object of type T2 where the string literal is applicable is a class-wide type the frontend crashes trying to evaluate if the object is a null extension. This problem

[Ada] Fix proof of runtime units

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Update to latest version of Why3 caused some proof regressions. Fix the proof by changing ghost code. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-imagei.adb (Set_Digits): Add assertion. * libgnat/s-imgboo.adb (Image_Boolean): Add assertions. *

[Ada] Errors missed on ACATS test B650007

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
This ACATS test shows that we need to call Is_Immutably_Limited_Type in Analyze_Function_Return and also that we have a latent bug in Is_Immutably_Limited_Type which shouldn't look through private types. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aux.adb

[Ada] Fix the parsing for delta aggregate

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
In Ada 2022, delta aggregate must use parentheses not square brackets except array delta aggregates. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gen_il-gen-gen_nodes.adb (Gen_IL.Gen.Gen_Nodes): Add Is_Homogeneous_Aggregate field for N_Delta_Aggregate nodes.

[Ada] Secondary stack and a-tags

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
The simple use of Ada.Tags triggers a dependency on the secondary stack mechanism, which is unwanted on small embedded targets. To avoid this dependency, we special case a-tags.ali in ALI.Scan_ALI to not set Sec_Stack_Used. If some other code calls one of the functions returning a string, this

[Ada] Fix problematic underflow for Float_Type'Value

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
We need a couple of guards for boundary conditions in the support code. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-dourea.adb ("/"): Add guard for zero and infinite divisor. * libgnat/s-valuer.adb (Scan_Raw_Real): Add guard for very large

[Ada] Spurious error on freezing of tagged types in SPARK

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
SPARK RM 7.7(8) mandates that the freezing point of a tagged type must occur within the so-called early call region of all its primitives. This check may lead to spurious errors due to generated constructs being considered in the search for the start of the early call region. Tested on

[Ada] Rework optimization skipping pragma check in object declaration

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
When an object declaration is initialized with a type conversion: Var : Typ := Typ (Value); we skip the check for Typ's predicate as it is already checked during the type conversion. This is not correct when Var's subtype and the target subtype of the conversion do not statically match: Var

[Ada] Fix internal error on subprogram instantiation

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
The compiler builds renamings for actuals of formal objects for debugging purposes in this case, but it must not generate them for temporaries. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_dbug.ads (Build_Subprogram_Instance_Renamings): Fix typo. *

[Ada] Overriding error on type derived from discriminated untagged private type

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
When a derived type DT has an untagged private parent type PT with a discriminant, where the full type of PT is tagged, and DT inherits a function F with an anonymous access result that designates the type, the compiler wrongly reports an error saying that DT must be declared abstract or F

[Ada] Prevent overflow in computation of aggregate size

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
When computing size of a static aggregate to decide if it should be transformed into assignments and loops we could have an overflow check. This is mostly harmless, because colossal aggregates will likely crash the application anyway, no matter how we transform them. This was not detected because

[Ada] Fast implementation of floating-point mathematical functions

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
This adds a package renaming unit to the GNAT hierarchy so as to expose the underlying implementation of floating-point mathematical functions, thus also making it possible to use their vector implementation, if any. The change also contains a small improvement to the Hide_Public_Entities

[Ada] Freezing too strict in instances

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Should_Freeze_Type is relaxed to only take the relevant case into account (entities denoted by generic actual parameters as per 13.14(5/3), as well as profile of any subprograms named as per 13.14(10.2/4)), instead of being overly conservative wrt instances and as a result, wrongly rejecting some

[Ada] Fix incorrect freezing with generic child unit

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
The Analyze_Associations.Check_Generic_Parent function was using an incorrect node as the instanciation node for the actual, possibly leading to incorrect freeze node being created (and later crashing in gigi). Using Get_Unit_Instantiation_Node fixes the issue. Tested on x86_64-pc-linux-gnu,

[Ada] Ada.Numerics.Aux.*: Mention more Intrinsic and less C Math Library

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
Since we import the elemental math functions as intrinsics, it's not accurate to state we're drawing them in from the C math library. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-nagefl.ads: Replace mentions of C/unix math library with intrinsics.

[Ada] Small performance tweak in recent change

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
This avoids a useless walk of the prefix chain in instances. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch8.adb (Analyze_Subprogram_Renaming): Move final test on In_Instance to outer condition.diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb ---

[Ada] New port arm-qnx

2022-05-18 Thread Pierre-Marie de Rodat via Gcc-patches
The QNX system specs for ARM and AARCH64 are identical. It makes more sense to have it named for the base architecture. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl: Rename system-qnx-aarch64.ads to system-qnx-arm.ads. (AARCH64 QNX section):

Re: [PATCH 1/3]middle-end: Add the ability to let the target decide the method of argument promotions.

2022-05-18 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > […] >> >> > We generate for e.g.: >> >> > >> >> > #include >> >> > >> >> > uint16_t f8 (uint8_t xr, uint8_t xc){ >> >> > return (uint8_t)(xr * xc); >> >> > } >> >> > >> >> > (insn 9 6 10 2 (set (reg:HI 101) >> >> (zero_extend:HI (reg/v:QI 96 [ xr ]))) "prom.c":4:16

Re: [committed] Revert 'Use more ARRAY_SIZE.' for mkoffload (was: [PATCH] Use more ARRAY_SIZE.)

2022-05-18 Thread Martin Liška
On 5/17/22 21:03, Tobias Burnus wrote: > This patch broke offloading – fixed by reverting the patch for > {gcn,nvptx}/mkoffload.cc – and committed as obvious. Changing a C-code > generating string without telling the then called C compiler about the > macro won't fly.  See attachment for >

Re: [PATCH] libgompd: Add OMPD support and global ICV functions

2022-05-18 Thread Jakub Jelinek via Gcc-patches
On Mon, May 16, 2022 at 07:35:17PM +0200, Mohamed Atef via Gcc-patches wrote: > libgomp/ChangeLog > > 2022-05-15 Mohamed Atef > > *config/darwin/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. > *config/hpux/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. > *config/posix/plugin-suffix.h

  1   2   >